Toxaris / pts

Interpreter for functional pure type systems.
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Check that any one underscore only represents one type #65

Open fehrenbach opened 10 years ago

fehrenbach commented 10 years ago

Currently this works:

assert (lambda f : Int -> * -> Int . f 2 Int) (lambda (x y : _7) . add x 1) = 5;

That is, _7 is both Int and *. This works because type inference is local and the underscore names do not actually have a meaning.

In the future there might be more complete type inference. In the interest of forward compatibility we want to prevent users from using this "feature".