Skip to content

Commit 78c68c7

Browse files
committed
[fix issue #33] Error messages should not mention Sigma and Pi
1 parent d0d9c4e commit 78c68c7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests.rkt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
(check-stop-message-equal? (rep init-ctx (parse-pie #'(the (-> Nat U) (lambda (x) x))))
136136
'("Expected" U "but given" Nat))
137137
(check-stop-message-equal? (rep init-ctx (parse-pie #'(zero zero)))
138-
'("Not a Π:" Nat))
138+
'("Not a function type:" Nat))
139139
(check-stop-message-equal? (rep init-ctx (parse-pie #'(the (-> Nat U) (lambda (x) x))))
140140
'("Expected" U "but given" Nat))
141141
(check-stop-message-equal? (rep init-ctx (parse-pie #'x))
@@ -178,9 +178,9 @@
178178
(check-equal? (norm-type init-ctx (parse-pie #'(Σ ((x Nat) (y Nat)) Nat)))
179179
(go '(Σ ((x Nat)) (Σ ((y Nat)) Nat))))
180180
(check-stop-message-equal? (rep init-ctx (parse-pie #'(car zero)))
181-
'("Not a Σ:" Nat))
181+
'("Not a pair type:" Nat))
182182
(check-stop-message-equal? (rep init-ctx (parse-pie #'(cdr zero)))
183-
'("Not a Σ:" Nat))
183+
'("Not a pair type:" Nat))
184184
(check-equal? (rep init-ctx (parse-pie #'Trivial))
185185
(go '(the U Trivial)))
186186
(check-equal? (rep init-ctx (parse-pie #'sole))

typechecker.rkt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
(go `(the ,(read-back-type Γ A) (car ,p-out)))]
339339
[non-Sigma
340340
(stop (src-loc e)
341-
`("Not a Σ:" ,(read-back-type Γ non-Sigma)))]))]
341+
`("Not a pair type:" ,(read-back-type Γ non-Sigma)))]))]
342342
[`(cdr ,p)
343343
(go-on ([`(the ,p-t ,p-out) (synth Γ r p)])
344344
(match (val-in-ctx Γ p-t)
@@ -348,7 +348,7 @@
348348
(cdr ,p-out)))]
349349
[non-Sigma
350350
(stop (src-loc e)
351-
`("Not a Σ:" ,(read-back-type Γ non-Sigma)))]))]
351+
`("Not a pair type:" ,(read-back-type Γ non-Sigma)))]))]
352352
[`(quote ,a)
353353
(if (atom-ok? a)
354354
(go `(the Atom (quote ,a)))
@@ -613,7 +613,7 @@
613613
(val-of-closure c (val-in-ctx Γ rand-out)))
614614
(,rator-out ,rand-out))))]
615615
[non-PI (stop (src-loc e)
616-
`("Not a Π:" ,(read-back-type Γ non-PI)))]))]
616+
`("Not a function type:" ,(read-back-type Γ non-PI)))]))]
617617
;;; Γ ⊢ (f x y ...) synth ~> (the (Pi ((x A)) B) app')
618618
;;; Γ ⊢ z ∈ A ~> z'
619619
;;;---------------------------------------------------
@@ -631,7 +631,7 @@
631631
(val-of-closure c (val-in-ctx Γ rand-out)))
632632
(,app0 ,rand-out))))]
633633
[non-PI (stop (src-loc e)
634-
`("Not a Π:" ,(read-back-type Γ non-PI)))]))]
634+
`("Not a function type:" ,(read-back-type Γ non-PI)))]))]
635635
[x
636636
(cond [(and (symbol? x) (var-name? x))
637637
(let ((real-x (rename r x)))

0 commit comments

Comments
 (0)