grace icon indicating copy to clipboard operation
grace copied to clipboard

Unique TypeVariables

Open luna-spirito opened this issue 2 years ago • 1 comments

Ensures there aren't any conflicting type variables.

Closes #64.

luna-spirito avatar Aug 18 '23 13:08 luna-spirito

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.

luna-spirito avatar Nov 20 '23 19:11 luna-spirito