summaryrefslogtreecommitdiff
path: root/gf-book/examples/chapter8/CalculatorS.gf
blob: d8c1df456af50d5f526309024c2ac2e71594b0ad (plain)
1
2
3
4
5
6
7
8
9
10
11
concrete CalculatorS of Calculator = open Prelude in {
  lin
    EPlus  = infix "plus" ;
    EMinus = infix "minus" ;
    ETimes = infix "times" ;
    EDiv   = infix ["divided by"] ;
    EInt i = i ;
  oper
    infix : Str -> SS -> SS -> SS = \op,x,y -> 
      ss (x.s ++ op ++ y.s ++ "PAUSE") ;
}