adamc@20: con c1 = int adamc@20: con c2 = (fn t :: Type => t) int adamc@20: adamc@20: con id = fn t :: Type => t adamc@20: con c3 = id int adamc@20: adamc@20: con fst = fn t1 :: Type => fn t2 :: Type => t1 adamc@20: con c4 = fst int string adamc@20: adamc@20: con snd = fn t1 :: Type => fn t2 :: Type => t2 adamc@20: con c5 = snd int string adamc@20: adamc@20: con apply = fn f :: Type -> Type => fn t :: Type => f t adamc@20: con c6 = apply id int adamc@20: con c7 = apply (fst int) string adamc@20: adamc@22: val tickle = fn n :: Name => fn t :: Type => fn fs :: {Type} => adamc@20: fn x : $([n = t] ++ fs) => x adamc@22: val tickleA = tickle[#A][int][[B = string]] adamc@22: val test_tickleA = tickleA {A = 6, B = "13"} adamc@22: adamc@22: val grab = fn n :: Name => fn t ::: Type => fn fs ::: {Type} => adamc@22: fn x : $([n = t] ++ fs) => x.n adamc@22: val test_grab1 = grab[#A] {A = 6, B = "13"} adamc@22: val test_grab2 = grab[#B] {A = 6, B = "13"}