summaryrefslogtreecommitdiff
path: root/book/examples/chapter6/Smart.gf
diff options
context:
space:
mode:
Diffstat (limited to 'book/examples/chapter6/Smart.gf')
-rw-r--r--book/examples/chapter6/Smart.gf16
1 files changed, 16 insertions, 0 deletions
diff --git a/book/examples/chapter6/Smart.gf b/book/examples/chapter6/Smart.gf
new file mode 100644
index 000000000..6fc3e0bc5
--- /dev/null
+++ b/book/examples/chapter6/Smart.gf
@@ -0,0 +1,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 ;
+
+}