summaryrefslogtreecommitdiff
path: root/transfer/examples/exp.tra
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-26 21:05:01 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-26 21:05:01 +0000
commitfb1d9b7d2c3c8261fc5a2ce3698e6749458b207a (patch)
tree466adc81f2c6ac803d20804863927c076e2b243a /transfer/examples/exp.tra
parent33eb6d899fef48f2d38a92bc0fab66ff585be553 (diff)
removed transfer from gf3
Diffstat (limited to 'transfer/examples/exp.tra')
-rw-r--r--transfer/examples/exp.tra33
1 files changed, 0 insertions, 33 deletions
diff --git a/transfer/examples/exp.tra b/transfer/examples/exp.tra
deleted file mode 100644
index e54b82055..000000000
--- a/transfer/examples/exp.tra
+++ /dev/null
@@ -1,33 +0,0 @@
-import prelude
-
-data Cat : Type where
- Stm : Cat
- Exp : Cat
- Var : Cat
- Typ : Cat
- ListStm : Cat
-
-data Tree : Cat -> Type where
- SDecl : Tree Typ -> Tree Var -> Tree Stm
- SAss : Tree Var -> Tree Exp -> Tree Stm
- SBlock : Tree ListStm -> Tree Stm
- EAdd : Tree Exp -> Tree Exp -> Tree Exp
- EStm : Tree Stm -> Tree Exp
- EVar : Tree Var -> Tree Exp
- EInt : Integer -> Tree Exp
- V : String -> Tree Var
- TInt : Tree Typ
- TFloat : Tree Typ
-
- NilStm : Tree ListStm
- ConsStm : Tree Stm -> Tree ListStm -> Tree ListStm
-
-derive Compos Tree
-
-rename : (String -> String) -> (C : Type) -> Tree C -> Tree C
-rename f C t = case t of
- V x -> V (f x)
- _ -> composOp ? ? compos_Tree C (rename f) t
-
-
-main = rename (const ? ? "apa") Stm (SAss (V "y") (EAdd (EVar (V "x")) (EInt 2))) \ No newline at end of file