summaryrefslogtreecommitdiff
path: root/gf-book/examples/chapter6/Smart.gf
blob: 6fc3e0bc594c63ba09bb88c18dea4a6365f3f57b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
abstract Smart = {

  cat
    Command ;
    Kind ; 
    Device Kind ; 
    Action Kind ; 

  fun 
    Act : (k : Kind) -> Action k -> Device k -> Command ;
    The : (k : Kind) -> Device k ;  -- the light
    Light, Fan : Kind ;
    Dim : Action Light ;
    SwitchOn, SwitchOff : (k : Kind) -> Action k ;

}