Fix infinite recursion on error

The implementation was meant to lift from SIO to IO,
but instead it was just the identity function,
which means that `fail = id . fail` and we have an infinite loop.
This commit is contained in:
Andreas Källberg
2020-10-26 16:05:30 +01:00
parent db5ee0b66a
commit 1ff66006b8

View File

@@ -60,7 +60,7 @@ instance Monad SIO where
SIO m1 >>= xm2 = SIO $ \ h -> m1 h >>= \ x -> unS (xm2 x) h
instance Fail.MonadFail SIO where
fail = liftSIO . fail
fail = lift0 . fail
instance Output SIO where
ePutStr = lift0 . ePutStr