blob: d7ac756b651cbb0779b7310c2c0260b7b17dfd76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
module Simpl020_A where
class GUIValue a
class GUIObject w where
toGUIObject :: w -> ()
cset :: GUIValue a => a -> w
instance GUIValue Int
class GUIObject w => HasSize w where
width :: Int -> w
class HasSize w => HasGeometry w where
geometry :: Int -> w
class GUIObject w => Window w where
instance Window w => HasSize w where
width w = geometry w
instance Window w => HasGeometry w where
geometry g = cset g
instance GUIObject ()
instance Window ()
|