view 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
line wrap: on
line source
con c1 = int
con c2 = (fn t :: Type => t) int

con id = fn t :: Type => t
con c3 = id int

con fst = fn t1 :: Type => fn t2 :: Type => t1
con c4 = fst int string

con snd = fn t1 :: Type => fn t2 :: Type => t2
con c5 = snd int string

con apply = fn f :: Type -> Type => fn t :: Type => f t
con c6 = apply id int
con c7 = apply (fst int) string

val grab = fn n :: Name => fn t :: Type => fn fs :: {Type} =>
        fn x : $([n = t] ++ fs) => x
val grabA = grab[#A][int][[B = string]]