1
0
forked from GitHub/gf-core

in tutorial/smart remove the hack that forced the proof object to be resolved

This commit is contained in:
krasimir
2010-10-18 12:28:39 +00:00
parent 51452d4ef0
commit e12d96451d
3 changed files with 32 additions and 55 deletions

View File

@@ -18,16 +18,16 @@ lincat
Action = {s : VForm => Str ; part : Str} ;
Device = {s : Str ; n : Number} ;
Location = SS ;
Switchable = SS ;
Dimmable = SS ;
Statelike = SS ;
Switchable = {} ;
Dimmable = {} ;
Statelike = {} ;
lin
UCommand c = c ;
UQuestion q = q ;
CAction _ act dev = ss (act.s ! VImp ++ bothWays act.part dev.s) ;
QAction _ act st dev = ss (be dev.n ++ dev.s ++ act.s ! VPart ++ act.part ++ st.s) ;
QAction _ act _ dev = ss (be dev.n ++ dev.s ++ act.s ! VPart ++ act.part) ;
DKindOne k = {
s = "the" ++ k.s ! Sg ;
@@ -45,10 +45,10 @@ lin
light = mkNoun "light" ;
fan = mkNoun "fan" ;
switchOn _ proof = mkVerb proof.s "switch" "switched" "on" ;
switchOff _ proof = mkVerb proof.s "switch" "switched" "off" ;
switchOn _ _ = mkVerb "switch" "switched" "on" ;
switchOff _ _ = mkVerb "switch" "switched" "off" ;
dim _ proof = mkVerb proof.s "dim" "dimmed" [] ;
dim _ _ = mkVerb "dim" "dimmed" [] ;
kitchen = ss "kitchen" ;
livingRoom = ss ["living room"] ;
@@ -61,10 +61,10 @@ oper
}
} ;
mkVerb : (_,_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \proof,go,gone,away -> {
mkVerb : (_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \go,gone,away -> {
s = table {
VImp => proof++go ;
VPart => proof++gone
VImp => go ;
VPart => gone
} ;
part = away
} ;
@@ -74,14 +74,5 @@ oper
Pl => "are"
} ;
hidden : SS = ss [] ;
lin
switchable_light = hidden ;
switchable_fan = hidden ;
dimmable_light = hidden ;
statelike_switchOn _ _ = hidden ;
statelike_switchOff _ _ = hidden ;
}