From 022783f4a7fd5b85afa5eedffd8a2e6a07432e1d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 21 Aug 2011 08:40:08 +0200 Subject: Get rid of existential Widget type and Widget lists --- lib/Phi/Widgets/Clock.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Phi/Widgets/Clock.hs') diff --git a/lib/Phi/Widgets/Clock.hs b/lib/Phi/Widgets/Clock.hs index 2607288..bee8d39 100644 --- a/lib/Phi/Widgets/Clock.hs +++ b/lib/Phi/Widgets/Clock.hs @@ -43,7 +43,7 @@ data ClockState = ClockState !ZonedTime deriving (Show, Eq) data ClockMessage = UpdateTime !ZonedTime deriving (Show, Typeable) -instance WidgetClass Clock ClockState where +instance Widget Clock ClockState where initWidget (Clock _) phi _ = do forkIO $ forever $ do time <- getZonedTime @@ -85,6 +85,6 @@ instance WidgetClass Clock ClockState where _ -> priv -clock :: ClockConfig -> Widget +clock :: ClockConfig -> Clock clock config = do - Widget $ Clock config \ No newline at end of file + Clock config \ No newline at end of file -- cgit v1.2.3