From 3db60b162a1e8482bb60f7638347de4cd7dc36f2 Mon Sep 17 00:00:00 2001 From: Adrien Duclos Date: Fri, 30 Nov 2018 11:36:53 +0100 Subject: [PATCH] Bump to LTS 12.20 --- Setup.hs | 3 +-- src/Text/BlazeT/Internal.hs | 12 ++++++++---- stack.yaml | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Setup.hs b/Setup.hs index 7b0e237..f09d443 100644 --- a/Setup.hs +++ b/Setup.hs @@ -7,8 +7,7 @@ main = do haddockHoogle = Flag True, haddockHtml = Flag True, haddockProgramArgs = [("-q",["aliased"])], -- does not seam to do anything - haddockExecutables = Flag True, - haddockHscolour = Flag True + haddockExecutables = Flag True } } 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 wrapMarkup2 = wrapMarkupT2 {-# INLINE wrapMarkup2 #-} +#if MIN_VERSION_base(4,11,0) +instance (Monad m,Monoid a) => Semigroup (MarkupT m a) where + a <> b = do {a' <- a; b >>= return . (mappend a')} + {-# INLINE (<>) #-} +#endif -instance (Monad m,Monoid a) => Monoid (MarkupT m a) where +instance (Functor m, Monad m,Monoid a) => Monoid (MarkupT m a) where mempty = return mempty - {-# INLINE mempty #-} - a `mappend` b = do {a' <- a; b >>= return . (mappend a')} + a `mappend` b = do {a' <- a; fmap (mappend a') b} {-# INLINE mappend #-} - + {-# INLINE mempty #-} instance Monad m => Text.Blaze.Attributable (MarkupT m a) where h ! a = wrapMarkupT2 (Text.Blaze.! a) h diff --git a/stack.yaml b/stack.yaml index 397b67a..ddbf53b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-7.15 +resolver: lts-12.20 # User packages to be built. # Various formats can be used as shown in the example below. @@ -63,4 +63,4 @@ extra-package-dbs: [] # extra-lib-dirs: [/path/to/dir] # # Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor \ No newline at end of file +# compiler-check: newer-minor -- 2.41.0