blob: d67843ef0520b662ed0cd4f128cf0058fda4be1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 } ;
}
|