diff --git a/CHANGES.md b/CHANGES.md index 30e8d3d97..bc0edbcb0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ * Mask `stToIO` from default exports. * Export `NonEmpty` type and constructor for Base 4.9 only. * Export `Data.Semigroup` type and functions for Base 4.9 only. +* Restrict exported symbols from ``async`` to set available in 2.0. 0.1.9 ==== diff --git a/protolude.cabal b/protolude.cabal index d67ed6b96..42e3e23e5 100644 --- a/protolude.cabal +++ b/protolude.cabal @@ -7,7 +7,7 @@ license: MIT license-file: LICENSE author: Stephen Diehl maintainer: stephen.m.diehl@gmail.com -copyright: 2016 Stephen Diehl +copyright: 2016-2017 Stephen Diehl category: Prelude build-type: Simple cabal-version: >=1.10 @@ -34,6 +34,9 @@ Source-Repository head library exposed-modules: Protolude + + other-modules: + Exceptions Unsafe Base Applicative @@ -47,11 +50,8 @@ library Functor Semiring Bifunctor - Exceptions Panic - other-modules: - default-extensions: NoImplicitPrelude OverloadedStrings @@ -64,6 +64,7 @@ library build-depends: base >= 4.6 && <4.10, + array >= 0.4 && <0.6, ghc-prim >= 0.3 && <0.6, async >= 2.0 && <2.2, deepseq >= 1.3 && <1.5, diff --git a/src/Exceptions.hs b/src/Exceptions.hs index f8c0adbf7..801b2aafc 100644 --- a/src/Exceptions.hs +++ b/src/Exceptions.hs @@ -22,6 +22,7 @@ hush :: Alternative m => Either e a -> m a hush (Left _) = empty hush (Right x) = pure x +-- To suppress redundenet applicative constraint warning on GHC 8.0 #if ( __GLASGOW_HASKELL__ >= 800 ) note :: (MonadError e m) => e -> Maybe a -> m a note err = maybe (throwError err) pure diff --git a/src/Functor.hs b/src/Functor.hs index 7d0a31d9f..ebc35030d 100644 --- a/src/Functor.hs +++ b/src/Functor.hs @@ -12,7 +12,7 @@ module Functor ( import Data.Function ((.)) -#if (__GLASGOW_HASKELL__ >= 710) +#if MIN_VERSION_base(4,7,0) import Data.Functor ( Functor(..) , ($>) diff --git a/src/Monad.hs b/src/Monad.hs index 1d9cdda03..139bacb74 100644 --- a/src/Monad.hs +++ b/src/Monad.hs @@ -42,12 +42,7 @@ module Monad ( import Base (seq) import Data.List (concat) - -#if (__GLASGOW_HASKELL__ >= 710) -import Control.Monad hiding ((<$!>)) -#else import Control.Monad -#endif concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] concatMapM f xs = liftM concat (mapM f xs) @@ -64,9 +59,11 @@ liftM2' f a b = do z `seq` return z {-# INLINE liftM2' #-} +#if !MIN_VERSION_base(4,8,0) (<$!>) :: Monad m => (a -> b) -> m a -> m b f <$!> m = do x <- m let z = f x z `seq` return z {-# INLINE (<$!>) #-} +#endif