diff --git a/README.md b/README.md index 1a12f9c0e..058399f0d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Design points: * Foldable / Traversable functions in scope by default. * Unsafe functions are prefixed with "unsafe" in separate module. * Compiler agnostic, GHC internal modules are abstracted out into Base. +* Compatibility with GHC 8.0. Supports: diff --git a/src/Base.hs b/src/Base.hs index d3a3aeb2a..f77805d99 100644 --- a/src/Base.hs +++ b/src/Base.hs @@ -56,6 +56,10 @@ import GHC.OverloadedLabels as X ( IsLabel(..) ) +import GHC.Records as X ( + HasField(..) + ) + import Data.Kind as X ( type (*) , type Type diff --git a/src/Protolude.hs b/src/Protolude.hs index 282838d93..0d821a3e8 100644 --- a/src/Protolude.hs +++ b/src/Protolude.hs @@ -75,7 +75,6 @@ import Control.Applicative as X ( -- Base typeclasses import Data.Eq as X import Data.Ord as X -import Data.Monoid as X import Data.Traversable as X import Data.Foldable as X hiding ( foldr1 @@ -85,7 +84,10 @@ import Data.Semiring as X import Data.Functor.Identity as X #if ( __GLASGOW_HASKELL__ >= 800 ) +import Data.Monoid as X hiding ((<>)) import Data.Semigroup as X ( Semigroup(..) ) +#else +import Data.Monoid as X #endif #if (__GLASGOW_HASKELL__ >= 710) @@ -349,3 +351,6 @@ print = liftIO . PBase.print show :: (Show a, StringConv String b) => a -> b show x = toS (PBase.show x) +{-# SPECIALIZE show :: Show a => a -> String #-} +{-# SPECIALIZE show :: Show a => a -> Text #-} +{-# SPECIALIZE show :: Show a => a -> LText #-}