summaryrefslogtreecommitdiff
path: root/src/runtime
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/runtime
parentbca0691cb028fe33ae1b77e71752d4e937490ff1 (diff)
parent8bcdeedba01847325cc89378fed114bc0561bd4d (diff)
Merge pull request #71 from anka-213/fix-newer-cabal
Fix support for newer stackage snapshots
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/haskell/Data/Binary/Get.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/haskell/Data/Binary/Get.hs b/src/runtime/haskell/Data/Binary/Get.hs
index 6e98434f5..01561d7d9 100644
--- a/src/runtime/haskell/Data/Binary/Get.hs
+++ b/src/runtime/haskell/Data/Binary/Get.hs
@@ -101,6 +101,10 @@ import GHC.Word
--import GHC.Int
#endif
+-- Control.Monad.Fail import will become redundant in GHC 8.8+
+import qualified Control.Monad.Fail as Fail
+
+
-- | The parse state
data S = S {-# UNPACK #-} !B.ByteString -- current chunk
L.ByteString -- the rest of the input
@@ -126,6 +130,11 @@ instance Monad Get where
(a, s') -> unGet (k a) s')
{-# INLINE (>>=) #-}
+#if !(MIN_VERSION_base(4,13,0))
+ fail = failDesc
+#endif
+
+instance Fail.MonadFail Get where
fail = failDesc
instance MonadFix Get where