From 1ff66006b8d928da01a56ca9f930f07b3cb2a01e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Mon, 26 Oct 2020 16:05:30 +0100 Subject: [PATCH] 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. --- src/compiler/GF/Infra/SIO.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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