summaryrefslogtreecommitdiff
path: root/old-examples/peacekeeping/PeaceCatI.gf
diff options
context:
space:
mode:
Diffstat (limited to 'old-examples/peacekeeping/PeaceCatI.gf')
-rw-r--r--old-examples/peacekeeping/PeaceCatI.gf22
1 files changed, 22 insertions, 0 deletions
diff --git a/old-examples/peacekeeping/PeaceCatI.gf b/old-examples/peacekeeping/PeaceCatI.gf
new file mode 100644
index 000000000..312bc1b1e
--- /dev/null
+++ b/old-examples/peacekeeping/PeaceCatI.gf
@@ -0,0 +1,22 @@
+incomplete concrete PeaceCatI of PeaceCat =
+ Cat ** open Lang, PeaceRes, Prelude in {
+
+ lincat
+ MassN = N ;
+ Phrase = { s : Str; p : Punct } ;
+ PhraseWritten = { s : Str } ;
+ PhraseSpoken = { s : Str } ;
+
+ lin
+ Written x = mkWritten x.s x.p ;
+ Spoken x = { s = x.s } ;
+
+ oper
+ mkWritten : Str -> Punct -> { s : Str } ;
+ mkWritten x p = case p of {
+ FullStop => { s = x ++ "." } ; --TFullStop (ss s) TEmpty ;
+ QuestMark => { s = x ++ "?" } ; --TQuestMark (ss s) TEmpty ;
+ ExclMark => { s = x ++ "!" } --TExclMark (ss s) TEmpty
+ } ;
+
+} \ No newline at end of file