summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Infra/SIO.hs
diff options
context:
space:
mode:
authorkrangelov <kr.angelov@gmail.com>2020-10-02 19:55:24 +0200
committerkrangelov <kr.angelov@gmail.com>2020-10-02 19:55:24 +0200
commitf3a8658cc1ed5b2721ee9d3f670f6b9a49f0f049 (patch)
tree8a311ec3c3a454088fa3c74b4464f974fe5aee21 /src/compiler/GF/Infra/SIO.hs
parentbfb94d1e48fded159bbf63a992564cb24e987772 (diff)
parentf56fbcf86e472262d07c6bd713f6955cfbcfee8a (diff)
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
Diffstat (limited to 'src/compiler/GF/Infra/SIO.hs')
-rw-r--r--src/compiler/GF/Infra/SIO.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/GF/Infra/SIO.hs b/src/compiler/GF/Infra/SIO.hs
index 75c57601b..0ce431380 100644
--- a/src/compiler/GF/Infra/SIO.hs
+++ b/src/compiler/GF/Infra/SIO.hs
@@ -42,6 +42,7 @@ import qualified GF.Command.Importing as GF(importGrammar, importSource)
#ifdef C_RUNTIME
import qualified PGF2
#endif
+import qualified Control.Monad.Fail as Fail
-- * The SIO monad
@@ -58,6 +59,9 @@ instance Monad SIO where
return x = SIO (const (return x))
SIO m1 >>= xm2 = SIO $ \ h -> m1 h >>= \ x -> unS (xm2 x) h
+instance Fail.MonadFail SIO where
+ fail = liftSIO . fail
+
instance Output SIO where
ePutStr = lift0 . ePutStr
ePutStrLn = lift0 . ePutStrLn