comparison tests/reduce.lac @ 20:1ab48e37d0ef

Some con reducing
author Adam Chlipala <adamc@hcoop.net>
date Sun, 08 Jun 2008 15:47:44 -0400
parents
children 067029c748e9
comparison
equal deleted inserted replaced
19:e634ae817a8e 20:1ab48e37d0ef
1 con c1 = int
2 con c2 = (fn t :: Type => t) int
3
4 con id = fn t :: Type => t
5 con c3 = id int
6
7 con fst = fn t1 :: Type => fn t2 :: Type => t1
8 con c4 = fst int string
9
10 con snd = fn t1 :: Type => fn t2 :: Type => t2
11 con c5 = snd int string
12
13 con apply = fn f :: Type -> Type => fn t :: Type => f t
14 con c6 = apply id int
15 con c7 = apply (fst int) string
16
17 val grab = fn n :: Name => fn t :: Type => fn fs :: {Type} =>
18 fn x : $([n = t] ++ fs) => x
19 val grabA = grab[#A][int][[B = string]]