diff options
| author | bringert <bringert@cs.chalmers.se> | 2006-03-20 18:23:55 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2006-03-20 18:23:55 +0000 |
| commit | 0419860b4e1463ef5c9f32e0697f917806b78752 (patch) | |
| tree | 61fc2bcb62b31f114ca44446dacb4d723a90a4e2 /transfer/examples | |
| parent | 8d1543684a37280ef23a2c7be5d141e1800cea9e (diff) | |
Transfer: some TODOs. Lots of minor fixes in type checking algorithm.
Diffstat (limited to 'transfer/examples')
| -rw-r--r-- | transfer/examples/tricky-type-checking.tra | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/transfer/examples/tricky-type-checking.tra b/transfer/examples/tricky-type-checking.tra index 4cc8037ba..ad69c33db 100644 --- a/transfer/examples/tricky-type-checking.tra +++ b/transfer/examples/tricky-type-checking.tra @@ -8,6 +8,12 @@ data Tree : Type -> Type where EInt : Integer -> Tree Integer EFoo : (A:Type) -> A -> Tree A +eval : (B : Type) -> Tree B -> Tree B +eval _ t = case t of + EAdd x y -> EInt (x+y) + EInt i -> EInt i + EFoo T x -> EFoo T x + strip : (B : Type) -> Tree B -> B strip _ t = case t of EAdd x y -> x+y |
