- changed status to closed
Cannot use otherwise bound names as type variables
Issue #9
closed
example:
#lang mlish
(define-type (Test X)
(A X))
(define (f [x : (Test A)] -> (Test A))
x)
Rather than using the A
in f
's signature as a type variable, it thinks it refers to the A
constructor and produces the error:
; TYPE-ERROR: tmp.mlish (6:22): constructor A must instantiate 1 type argument(s): X
; and be applied to 1 arguments with type(s): X
There may not be anything I can do about this, unless type variables are further distinguished somehow.
Comments (1)
-
reporter - Log in to comment
infer quantified type variables in the order that they occur (L-to-R)
#9, closes#11→ <<cset c64251cac0e8>>