summaryrefslogtreecommitdiff
path: root/book/examples/chapter7/MapEng.gf
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2010-11-22 15:48:52 +0000
committeraarne <aarne@chalmers.se>2010-11-22 15:48:52 +0000
commit67176f1520d8ac68a00b5266092fcd31a82f4bd8 (patch)
tree6309b8ccfedb458fec7f9772e01b496975e0389f /book/examples/chapter7/MapEng.gf
parent76ba03b545600054176612201de78dca16eb65e1 (diff)
completed book examples
Diffstat (limited to 'book/examples/chapter7/MapEng.gf')
-rw-r--r--book/examples/chapter7/MapEng.gf17
1 files changed, 17 insertions, 0 deletions
diff --git a/book/examples/chapter7/MapEng.gf b/book/examples/chapter7/MapEng.gf
new file mode 100644
index 000000000..fee0b502c
--- /dev/null
+++ b/book/examples/chapter7/MapEng.gf
@@ -0,0 +1,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 ++ ")"} ;
+}