Universally quantified type variables
Implement universally quantified type variables, both explicitly given by the user and inferred by the type inference algorithm.
This commit is contained in:
parent
7960c3270e
commit
ecb4c0f803
17 changed files with 634 additions and 111 deletions
|
|
@ -1,3 +1,3 @@
|
|||
fn id x = x
|
||||
fn plus x y = x + y
|
||||
fn plus (x: int) (y: int) = x + y
|
||||
fn main = plus (id 2) 7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue