diff options
Diffstat (limited to 'lib/Phi/Widget.hs')
-rw-r--r-- | lib/Phi/Widget.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Phi/Widget.hs b/lib/Phi/Widget.hs index 5ffd534..68bed1b 100644 --- a/lib/Phi/Widget.hs +++ b/lib/Phi/Widget.hs @@ -98,12 +98,12 @@ type RenderCache w s = IOCache (w, s, Int, Int, Int, Int, Xlib.Rectangle) Surfac createIOCache :: Eq a => (a -> IO b) -> IOCache a b createIOCache = lift . Kleisli -runIOCache :: Eq a => a -> StateT (IOCache a b) IO (b, Bool) +runIOCache :: Eq a => a -> StateT (IOCache a b) IO b runIOCache a = do cache <- get - (b, updated, cache') <- liftIO $ runKleisli (runCache' cache) a + (b, cache') <- liftIO $ runKleisli (runCache cache) a put cache' - return (b, updated) + return b createRenderCache :: (w -> s -> Int -> Int -> Int -> Int -> Xlib.Rectangle -> Render ()) -> CacheArrow (Kleisli IO) (w, s, Int, Int, Int, Int, Xlib.Rectangle) Surface |