summaryrefslogtreecommitdiff
path: root/examples/tutorial/smart/SmartEng.gf
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-07-07 10:12:08 +0000
committerkrasimir <krasimir@chalmers.se>2010-07-07 10:12:08 +0000
commitc066721dd1b200eb7e22c8c242bf48a83e5fcc69 (patch)
treef0eda3a37c33b2ea0f8d1524eb70328b36184322 /examples/tutorial/smart/SmartEng.gf
parent2cd3523d0466f87bc50306ae27b5afb9040f5c87 (diff)
fix in example/tutorial/smart/SmartFre.gf to make the dependent types work nicely
Diffstat (limited to 'examples/tutorial/smart/SmartEng.gf')
-rw-r--r--examples/tutorial/smart/SmartEng.gf15
1 files changed, 9 insertions, 6 deletions
diff --git a/examples/tutorial/smart/SmartEng.gf b/examples/tutorial/smart/SmartEng.gf
index eff8a000a..c5d9ac090 100644
--- a/examples/tutorial/smart/SmartEng.gf
+++ b/examples/tutorial/smart/SmartEng.gf
@@ -18,6 +18,9 @@ lincat
Action = {s : VForm => Str ; part : Str} ;
Device = {s : Str ; n : Number} ;
Location = SS ;
+ Switchable = SS ;
+ Dimmable = SS ;
+ Statelike = SS ;
lin
UCommand c = c ;
@@ -42,10 +45,10 @@ lin
light = mkNoun "light" ;
fan = mkNoun "fan" ;
- switchOn _ _ = mkVerb "switch" "swithced" "on" ;
- switchOff _ _ = mkVerb "switch" "swithced" "off" ;
+ switchOn _ proof = mkVerb proof.s "switch" "switched" "on" ;
+ switchOff _ proof = mkVerb proof.s "switch" "switched" "off" ;
- dim _ _ = mkVerb "dim" "dimmed" [] ;
+ dim _ proof = mkVerb proof.s "dim" "dimmed" [] ;
kitchen = ss "kitchen" ;
livingRoom = ss ["living room"] ;
@@ -58,10 +61,10 @@ oper
}
} ;
- mkVerb : (_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \go,gone,away -> {
+ mkVerb : (_,_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \proof,go,gone,away -> {
s = table {
- VImp => go ;
- VPart => gone
+ VImp => proof++go ;
+ VPart => proof++gone
} ;
part = away
} ;