Files
gf-core/eclipse/examples/hello/HelloEng.gf
2011-10-17 16:01:07 +00:00

22 lines
467 B
Plaintext

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 } ;
}