
The old check was broken for cases with type constructors with more than one type argument and was also too conservative in some cases (e.g., when one cycle refers to another cycle of aliases in a non-recursive manner). The new check is still conservative, but it allows more types than before. Closes GH issue #157
11 lines
243 B
Racket
11 lines
243 B
Racket
#lang typed/racket
|
|
|
|
;; These aliases should be allowed because there's no
|
|
;; polymorphic recursion
|
|
;;
|
|
;; Tests for GH issue #157
|
|
|
|
(define-type (a T U) (-> (b U)))
|
|
(define-type (b T) (-> (a T Integer)))
|
|
(define-type (c T) (a (c T) Number))
|