grace
grace copied to clipboard
Unique TypeVariables
Ensures there aren't any conflicting type variables.
Closes #64.
This PR does not perform necessary substitutions for check phase:
>>> let test : (forall (x : Type). x -> x) = let test2 : (forall (x : Type). x -> x) = \x -> let y : x = x in y in test2 in test
Not a subtype
The following type:
x0
(input):1:63:
│
1 │ let test : (forall (x : Type). x -> x) = let test2 : (forall (x : Type). x -> x) = \x -> let y : x = x in y in test2 in test
│ ↑
… cannot be a subtype of:
x
(input):1:98:
│
1 │ let test : (forall (x : Type). x -> x) = let test2 : (forall (x : Type). x -> x) = \x -> let y : x = x in y in test2 in test
│ ↑
I guess there must be a better approach.