git.iko.soy/typeable/attoparsec
on master help sign in
Adapt to base-4.13.0.0
commite9528475729026b95e11178396c24c425fcbdd45 authorOleg Grenrus <oleg.grenrus@iki.fi> dateMon 12 Aug 2019, 19:20 (7 years ago) parent78179d0
2 files changed+5−1
Data/Attoparsec/Internal/Types.hs+3−1 Data/Attoparsec/Zepto.hs+2
Data/Attoparsec/Internal/Types.hs+3−1
@@ -1,4 +1,4 @@
1−{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, OverloadedStrings,
1+{-# LANGUAGE CPP, BangPatterns, GeneralizedNewtypeDeriving, OverloadedStrings,
22 Rank2Types, RecordWildCards, TypeFamilies #-}
33-- |
44-- Module : Data.Attoparsec.Internal.Types
@@ -136,8 +136,10 @@ instance Mon.Monoid More where
136136 mempty = Incomplete
137137
138138instance Monad (Parser i) where
139+#if !(MIN_VERSION_base(4,13,0))
139140 fail = Fail.fail
140141 {-# INLINE fail #-}
142+#endif
141143
142144 return = App.pure
143145 {-# INLINE return #-}
Data/Attoparsec/Zepto.hs+2
@@ -92,8 +92,10 @@ instance Monad m => Monad (ZeptoT m) where
9292 Fail err -> return (Fail err)
9393 {-# INLINE (>>=) #-}
9494
95+#if !(MIN_VERSION_base(4,13,0))
9596 fail = Fail.fail
9697 {-# INLINE fail #-}
98+#endif
9799
98100instance Monad m => Fail.MonadFail (ZeptoT m) where
99101 fail msg = Parser $ \_ -> return (Fail msg)