Changed all example programs to use layout syntax.

This commit is contained in:
bringert
2005-11-28 21:45:22 +00:00
parent 576f25b53e
commit 2e16e1e384
10 changed files with 83 additions and 90 deletions

View File

@@ -0,0 +1,16 @@
Additive : Type -> Type
Additive A = { zero : A; plus : A -> A -> A }
additive_Integer : Additive Integer
additive_Integer = { zero = 0; plus = prim_add_Int }
sum : (A:Type) -> Additive A -> List A -> A
sum _ d (Nil _) = d.zero
sum A d (Cons _ x xs) = d.plus x (sum A d xs)
Showable : Type -> Type
Showable A = { show : A -> String }
--Compositional : Type -> Type
--Compositional A = { composOp : }