Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions xml-hamlet/Text/Hamlet/XMLParse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion xml-hamlet/xml-hamlet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down