summaryrefslogtreecommitdiff
path: root/examples/tutorial/calculator/Calculator.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-09-04 20:51:26 +0000
committeraarne <aarne@cs.chalmers.se>2007-09-04 20:51:26 +0000
commite2b9657f79d913dddb064037e79a9dd1a63bdbf9 (patch)
treefc6bd314d5b69e570670a0c50204a017b954f111 /examples/tutorial/calculator/Calculator.gf
parent6150508b4e105680ee9ee1dbcab462267cd8e5ba (diff)
cleaned up Calculator example
Diffstat (limited to 'examples/tutorial/calculator/Calculator.gf')
-rw-r--r--examples/tutorial/calculator/Calculator.gf6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tutorial/calculator/Calculator.gf b/examples/tutorial/calculator/Calculator.gf
index c2fbcd1bc..65192e226 100644
--- a/examples/tutorial/calculator/Calculator.gf
+++ b/examples/tutorial/calculator/Calculator.gf
@@ -6,7 +6,7 @@ abstract Calculator = {
fun
PEmpty : Prog ;
- PDecl : Exp -> (Var -> Prog) -> Prog ;
+ PInit : Exp -> (Var -> Prog) -> Prog ;
PAss : Var -> Exp -> Prog -> Prog ;
EPlus, EMinus, ETimes, EDiv : Exp -> Exp -> Exp ;
@@ -18,8 +18,8 @@ abstract Calculator = {
def
ex1 =
- PDecl (EPlus (EInt 2) (EInt 3)) (\x ->
- PDecl (EPlus (EVar x) (EInt 1)) (\y ->
+ PInit (EPlus (EInt 2) (EInt 3)) (\x ->
+ PInit (EPlus (EVar x) (EInt 1)) (\y ->
PAss x (EPlus (EVar x) (ETimes (EInt 9) (EVar y))) PEmpty)) ;
}