Skip to content

Commit bdb5d8b

Browse files
committed
Handle MonadFail proposal.
1 parent e5e6a3b commit bdb5d8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Graphics/Rendering/OpenGL/GL/IOState.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ instance Functor (IOState s) where
4040
instance Monad (IOState s) where
4141
return a = IOState $ \s -> return (a, s)
4242
m >>= k = IOState $ \s -> do (a, s') <- runIOState m s ; runIOState (k a) s'
43+
#if MIN_VERSION_base(4,13,0)
44+
instance MonadFail (IOState s) where
45+
#endif
4346
fail str = IOState $ \_ -> fail str
4447

4548
getIOState :: IOState s (Ptr s)

0 commit comments

Comments
 (0)