Add optimization cases for triage and composition
This commit is contained in:
11
lib/base.tri
11
lib/base.tri
@ -7,17 +7,14 @@ s = t (t (k t)) t
|
||||
m = s i i
|
||||
b = s (k s) k
|
||||
c = s (s (k s) (s (k k) s)) (k k)
|
||||
iC = (\a b c : s a (k c) b)
|
||||
iD = b (b iC) iC
|
||||
iE = b (b iD) iC
|
||||
yi = (\i : b m (c b (i m)))
|
||||
y = yi iC
|
||||
yC = yi iD
|
||||
yD = yi iE
|
||||
id = (\a : a)
|
||||
pair = t
|
||||
if = (\cond then else : t (t else (t t then)) t cond)
|
||||
|
||||
y = ((\mut wait fun : wait mut (\x : fun (wait mut x)))
|
||||
(\x : x x)
|
||||
(\a0 a1 a2 : t (t a0) (t t a2) a1))
|
||||
|
||||
triage = (\leaf stem fork : t (t leaf stem) fork)
|
||||
test = triage "Leaf" (\_ : "Stem") (\_ _ : "Fork")
|
||||
|
||||
|
Reference in New Issue
Block a user