summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorAndreas Källberg <anka.213@gmail.com>2020-10-26 16:05:30 +0100
committerAndreas Källberg <anka.213@gmail.com>2020-10-26 17:21:22 +0100
commit1ff66006b8d928da01a56ca9f930f07b3cb2a01e (patch)
tree87c079df07b803f0616ccd5dd6c5328ea662693a /src/compiler
parentdb5ee0b66a1db3a28dad9c74b6fe98d80729fa93 (diff)
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.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/GF/Infra/SIO.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/GF/Infra/SIO.hs b/src/compiler/GF/Infra/SIO.hs
index 0ce431380..906f39345 100644
--- a/src/compiler/GF/Infra/SIO.hs
+++ b/src/compiler/GF/Infra/SIO.hs
@@ -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