packages feed

base-prelude 1.0.1.1 → 1.0.2

raw patch · 3 files changed

+32/−4 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ BasePrelude: infixl 1 &
+ BasePrelude: infixl 4 $>
- BasePrelude: isSubsequenceOf :: (Eq a) => [a] -> [a] -> Bool
+ BasePrelude: isSubsequenceOf :: Eq a => [a] -> [a] -> Bool
- BasePrelude: traceM :: (Monad m) => String -> m ()
+ BasePrelude: traceM :: Applicative f => String -> f ()
- BasePrelude: traceShowId :: (Show a) => a -> a
+ BasePrelude: traceShowId :: Show a => a -> a
- BasePrelude: traceShowM :: (Show a, Monad m) => a -> m ()
+ BasePrelude: traceShowM :: (Show a, Applicative f) => a -> f ()

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# 1.0.2++* Export `Foreign`+ # 1.0.1  * Relaxed the "base" dependency
base-prelude.cabal view
@@ -1,7 +1,7 @@ name:   base-prelude version:-  1.0.1.1+  1.0.2 synopsis:   The most complete prelude formed solely from the "base" package description:
library/BasePrelude.hs view
@@ -66,7 +66,7 @@ import Data.Version as Exports import Data.Word as Exports import Debug.Trace as Exports hiding (traceShowId, traceM, traceShowM)-import Foreign.Storable as Exports (Storable)+import Foreign as Exports hiding (void, unsafePerformIO) import GHC.Conc as Exports hiding (withMVar, threadWaitWriteSTM, threadWaitWrite, threadWaitReadSTM, threadWaitRead) import GHC.Exts as Exports (lazy, inline, sortWith, groupWith) import GHC.Generics as Exports (Generic)@@ -87,10 +87,24 @@ import Text.Read as Exports (Read(..), readMaybe, readEither) import Unsafe.Coerce as Exports +-- Conditional imports for reimplementations+#if MIN_VERSION_base(4,7,0)+import Data.Bool (bool)+import Debug.Trace (traceShowId, traceM, traceShowM)+import Data.Functor (($>))+#endif+#if MIN_VERSION_base(4,8,0)+import Data.Function ((&))+import Data.List (isSubsequenceOf, sortOn, uncons)+#endif --- Reimplementations-------------------------- +---------------------------------+-- Reimplementations for base-4.7+---------------------------------++#if !MIN_VERSION_base(4,7,0)+ -- | Case analysis for the 'Bool' type. -- @bool a b p@ evaluates to @a@ when @p@ is @False@, and evaluates to @b@ -- when @p@ is @True@.@@ -135,6 +149,14 @@ ($>) :: Functor f => f a -> b -> f b ($>) = flip (<$) +#endif++---------------------------------+-- Reimplementations for base-4.8+---------------------------------++#if !MIN_VERSION_base(4,8,0)+ infixl 1 &  -- | '&' is a reverse application operator.  This provides notational@@ -177,3 +199,5 @@ sortOn :: Ord b => (a -> b) -> [a] -> [a] sortOn f =   map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x))++#endif