summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Infra/CheckM.hs
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@johnjcamilleri.com>2020-09-14 22:42:37 +0200
committerGitHub <noreply@github.com>2020-09-14 22:42:37 +0200
commit6c54e5b63cb563d780843a1970cba0718a5203f8 (patch)
treeed6777f6cb20f9212fa29ce68fac7e22745c707c /src/compiler/GF/Infra/CheckM.hs
parentbca0691cb028fe33ae1b77e71752d4e937490ff1 (diff)
parent8bcdeedba01847325cc89378fed114bc0561bd4d (diff)
Merge pull request #71 from anka-213/fix-newer-cabal
Fix support for newer stackage snapshots
Diffstat (limited to 'src/compiler/GF/Infra/CheckM.hs')
-rw-r--r--src/compiler/GF/Infra/CheckM.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/GF/Infra/CheckM.hs b/src/compiler/GF/Infra/CheckM.hs
index c5f9ba255..c0234999a 100644
--- a/src/compiler/GF/Infra/CheckM.hs
+++ b/src/compiler/GF/Infra/CheckM.hs
@@ -32,6 +32,7 @@ import System.FilePath(makeRelative)
import Control.Parallel.Strategies(parList,rseq,using)
import Control.Monad(liftM,ap)
import Control.Applicative(Applicative(..))
+import qualified Control.Monad.Fail as Fail
type Message = Doc
type Error = Message
@@ -53,6 +54,9 @@ instance Monad Check where
(ws,Success x) -> unCheck (g x) {-ctxt-} ws
(ws,Fail msg) -> (ws,Fail msg)
+instance Fail.MonadFail Check where
+ fail = raise
+
instance Applicative Check where
pure = return
(<*>) = ap