summaryrefslogtreecommitdiff
path: root/eclipse/examples/hello/HelloEng.gf
diff options
context:
space:
mode:
authorjohn.j.camilleri <john.j.camilleri@chalmers.se>2011-10-17 16:01:07 +0000
committerjohn.j.camilleri <john.j.camilleri@chalmers.se>2011-10-17 16:01:07 +0000
commitd9f7697f7a9f8fb44fa2ead3eecf6ca3c3cad19f (patch)
treeedd9fa3fc1bcd7ed1653a1350541b2e7cb8de6a4 /eclipse/examples/hello/HelloEng.gf
parent83533afd5f8fe3c053b234d365a5a7325c86e594 (diff)
Added Eclipse contents
Diffstat (limited to 'eclipse/examples/hello/HelloEng.gf')
-rw-r--r--eclipse/examples/hello/HelloEng.gf21
1 files changed, 21 insertions, 0 deletions
diff --git a/eclipse/examples/hello/HelloEng.gf b/eclipse/examples/hello/HelloEng.gf
new file mode 100644
index 000000000..d67843ef0
--- /dev/null
+++ b/eclipse/examples/hello/HelloEng.gf
@@ -0,0 +1,21 @@
+concrete HelloEng of HelloAbs = ResEng ** {
+
+ lincat
+ Greeting, Farewell = {s : Str} ;
+ Recipient = {s : Gender => Str} ;
+
+ lin
+ Hello recip = {s = "hello" ++ recip.s ! Masc} ;
+ Goodbye recip = {s = "goodbye" ++ recip.s ! Fem} ;
+
+ World = {s = \\_ => "world"} ;
+ Parent = { s = table {
+ Masc => "dad" ; Fem => "mum"
+ } } ;
+ Friends = superate "friends" ;
+
+ oper
+ superate : Str -> Recipient = \s ->
+ lin Recipient { s = \\_ => "super" ++ s } ;
+
+}