aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Text
diff options
context:
space:
mode:
authorAdrien Duclos <adrien.duclos@fretlink.com>2018-11-30 11:36:53 +0100
committerAdrien Duclos <adrien.duclos@fretlink.com>2018-11-30 13:02:49 +0100
commit3db60b162a1e8482bb60f7638347de4cd7dc36f2 (patch)
tree0f1edaa60dd610f506a63df4fd89be68aa7eba8b /src/Text
parent4dc7c9b2b700d43e6b8550b218b6c67bdf20f565 (diff)
downloadblazeT-3db60b162a1e8482bb60f7638347de4cd7dc36f2.tar.gz
blazeT-3db60b162a1e8482bb60f7638347de4cd7dc36f2.tar.zst
blazeT-3db60b162a1e8482bb60f7638347de4cd7dc36f2.zip
Bump to LTS 12.20
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/BlazeT/Internal.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Text/BlazeT/Internal.hs b/src/Text/BlazeT/Internal.hs
index f6f642a..feaf68f 100644
--- a/src/Text/BlazeT/Internal.hs
+++ b/src/Text/BlazeT/Internal.hs
@@ -188,13 +188,17 @@ wrapMarkup2 :: (Text.Blaze.Markup -> Text.Blaze.Markup) -> Markup2
188wrapMarkup2 = wrapMarkupT2 188wrapMarkup2 = wrapMarkupT2
189{-# INLINE wrapMarkup2 #-} 189{-# INLINE wrapMarkup2 #-}
190 190
191#if MIN_VERSION_base(4,11,0)
192instance (Monad m,Monoid a) => Semigroup (MarkupT m a) where
193 a <> b = do {a' <- a; b >>= return . (mappend a')}
194 {-# INLINE (<>) #-}
195#endif
191 196
192instance (Monad m,Monoid a) => Monoid (MarkupT m a) where 197instance (Functor m, Monad m,Monoid a) => Monoid (MarkupT m a) where
193 mempty = return mempty 198 mempty = return mempty
194 {-# INLINE mempty #-} 199 a `mappend` b = do {a' <- a; fmap (mappend a') b}
195 a `mappend` b = do {a' <- a; b >>= return . (mappend a')}
196 {-# INLINE mappend #-} 200 {-# INLINE mappend #-}
197 201 {-# INLINE mempty #-}
198 202
199instance Monad m => Text.Blaze.Attributable (MarkupT m a) where 203instance Monad m => Text.Blaze.Attributable (MarkupT m a) where
200 h ! a = wrapMarkupT2 (Text.Blaze.! a) h 204 h ! a = wrapMarkupT2 (Text.Blaze.! a) h