AnyDSL / MimIR

MimIR is my Intermediate Representation
https://anydsl.github.io/MimIR/
MIT License
46 stars 9 forks source link

Refactor/colon #218

Closed leissa closed 1 year ago

leissa commented 1 year ago

Use : in .lam/.lm/.fun/.fn to separate (optional) return type instead of ->:

.lam f(x y: .Nat): .Nat = x;

This is like in Lean or SML and resolves an ambiguity:

.lam f x: .Nat -> .Nat = x; 
// does it mean: 
.lam f(x: .Nat) -> .Nat = x;
// or:
.lam f(x: .Nat -> .Nat) = x;

And looks like this now:

.lam f x: .Nat : .Nat = x;

You still want to use parentheses in this case though...