diff options
Diffstat (limited to 'eclipse/examples/hello')
| -rw-r--r-- | eclipse/examples/hello/AbsCat.gf | 5 | ||||
| -rw-r--r-- | eclipse/examples/hello/HelloAbs.gf | 12 | ||||
| -rw-r--r-- | eclipse/examples/hello/HelloEng.gf | 21 | ||||
| -rw-r--r-- | eclipse/examples/hello/ResEng.gf | 8 |
4 files changed, 46 insertions, 0 deletions
diff --git a/eclipse/examples/hello/AbsCat.gf b/eclipse/examples/hello/AbsCat.gf new file mode 100644 index 000000000..dac5c07db --- /dev/null +++ b/eclipse/examples/hello/AbsCat.gf @@ -0,0 +1,5 @@ +abstract AbsCat = { + + cat Greeting ; Recipient ; + +}; diff --git a/eclipse/examples/hello/HelloAbs.gf b/eclipse/examples/hello/HelloAbs.gf new file mode 100644 index 000000000..70ab490bf --- /dev/null +++ b/eclipse/examples/hello/HelloAbs.gf @@ -0,0 +1,12 @@ +abstract HelloAbs = AbsCat [Greeting, Recipient] ** { + + flags startcat = Greeting ; + + cat Farewell ; + + fun + Hello : Recipient -> Greeting ; + Goodbye : Recipient -> Farewell ; + World, Parent, Friends : Recipient ; + +} 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 } ; + +} diff --git a/eclipse/examples/hello/ResEng.gf b/eclipse/examples/hello/ResEng.gf new file mode 100644 index 000000000..1ecf97a4d --- /dev/null +++ b/eclipse/examples/hello/ResEng.gf @@ -0,0 +1,8 @@ +--# -path=.:../abstract:../common:../../prelude +resource ResEng = { + + param + OtherParam = A | B ; + Gender = Masc | Fem ; + +} ; |
