diff --git a/xml-hamlet/Text/Hamlet/XMLParse.hs b/xml-hamlet/Text/Hamlet/XMLParse.hs index d5a4e5c..6d0cdf8 100644 --- a/xml-hamlet/Text/Hamlet/XMLParse.hs +++ b/xml-hamlet/Text/Hamlet/XMLParse.hs @@ -22,7 +22,9 @@ import Text.ParserCombinators.Parsec hiding (Line) data Result v = Error String | Ok v deriving (Show, Eq, Read, Data, Typeable) instance Monad Result where - return = Ok +#if !MIN_VERSION_base(4,8,0) + return = pure +#endif Error s >>= _ = Error s Ok v >>= f = f v #if MIN_VERSION_base(4,13,0) @@ -32,7 +34,7 @@ instance MonadFail Result where instance Functor Result where fmap = liftM instance Applicative Result where - pure = return + pure = Ok (<*>) = ap data Content = ContentRaw String diff --git a/xml-hamlet/xml-hamlet.cabal b/xml-hamlet/xml-hamlet.cabal index 8aed7bc..bd81fe1 100644 --- a/xml-hamlet/xml-hamlet.cabal +++ b/xml-hamlet/xml-hamlet.cabal @@ -18,7 +18,7 @@ Library Other-modules: Text.Hamlet.XMLParse Build-depends: base >= 4.12 && < 5 - , shakespeare >= 1.0 && < 2.2 + , shakespeare >= 1.0 && < 2.3 , xml-conduit >= 1.0 , text >= 0.10 , template-haskell