Adjust TR error message for consistency

The non-productive type check in type parsing and in type
alias setup should produce the same failure messages.
This commit is contained in:
Asumu Takikawa 2014-06-09 13:56:28 -04:00
parent 4ee5f3f653
commit 5431ddb6c1
2 changed files with 6 additions and 5 deletions

View File

@ -71,9 +71,10 @@
[((PolyRow: _ _ body)) (check body)]
[(_) #t])
(unless (check type)
(tc-error/stx
id
"Recursive types are not allowed directly inside their definition")))
(tc-error/fields
"parse error in type"
#:stx id
#:more "recursive types are not allowed directly inside their definition")))
;; get-type-alias-info : Listof<Syntax> -> Listof<Id> Dict<Id, TypeAliasInfo>
;;

View File

@ -2615,9 +2615,9 @@
[tc-err (let () (define-type-alias A (Class #:implements A)) "dummy")
#:msg "Recursive #:implements clause not allowed"]
[tc-err (let () (define-type-alias X (U X #f)) "dummy")
#:msg "Recursive types are not allowed directly inside"]
#:msg "recursive types are not allowed directly inside"]
[tc-err (let () (define-type-alias X (All (A #:row) X)) "dummy")
#:msg "Recursive types are not allowed directly inside"]
#:msg "recursive types are not allowed directly inside"]
;; Check the more precise Tarjan's algorithm-based letrec-values type checking
[tc-e ;; An example from Eric Dobson (see gh372) that shows that precisely