typed-racket/typed-racket-test/succeed/gh-issue-157.rkt
Asumu Takikawa 6512b52b1d Fix polymorphic recursion check for type aliases
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
2015-08-07 19:05:13 -04:00

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))