From 67176f1520d8ac68a00b5266092fcd31a82f4bd8 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 22 Nov 2010 15:48:52 +0000 Subject: completed book examples --- book/examples/chapter6/Smart.gf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 book/examples/chapter6/Smart.gf (limited to 'book/examples/chapter6/Smart.gf') 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 ; + +} -- cgit v1.2.3