summaryrefslogtreecommitdiff
path: root/gf-book/examples/chapter7/MapEng.gf
blob: fee0b502c69086a897c417857cea80dff93f754d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
concrete MapEng of Map = {
lincat
  Query        = {s : Str} ;
  Input, Place = {s : Str ; p : Str} ;
  Click        = {p : Str} ;
lin
  GoFromTo x y = {
    s = "I want to go from" ++ x.s ++ "to" ++ y.s ; 
    p = x.p ++ y.p
    } ;
  ThisPlace c = {
    s = "this place" ; 
    p = c.p
    } ;
  QueryInput i = {s = i.s ++ ";" ++ i.p} ;
  ClickCoord x y = {p = "(" ++ x.s ++ "," ++ y.s ++ ")"} ;
}