Mask supporting modules
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
* Mask `stToIO` from default exports.
|
* Mask `stToIO` from default exports.
|
||||||
* Export `NonEmpty` type and constructor for Base 4.9 only.
|
* Export `NonEmpty` type and constructor for Base 4.9 only.
|
||||||
* Export `Data.Semigroup` type and functions 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
|
0.1.9
|
||||||
====
|
====
|
||||||
|
|||||||
+5
-4
@@ -7,7 +7,7 @@ license: MIT
|
|||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Stephen Diehl
|
author: Stephen Diehl
|
||||||
maintainer: stephen.m.diehl@gmail.com
|
maintainer: stephen.m.diehl@gmail.com
|
||||||
copyright: 2016 Stephen Diehl
|
copyright: 2016-2017 Stephen Diehl
|
||||||
category: Prelude
|
category: Prelude
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
cabal-version: >=1.10
|
cabal-version: >=1.10
|
||||||
@@ -34,6 +34,9 @@ Source-Repository head
|
|||||||
library
|
library
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Protolude
|
Protolude
|
||||||
|
|
||||||
|
other-modules:
|
||||||
|
Exceptions
|
||||||
Unsafe
|
Unsafe
|
||||||
Base
|
Base
|
||||||
Applicative
|
Applicative
|
||||||
@@ -47,11 +50,8 @@ library
|
|||||||
Functor
|
Functor
|
||||||
Semiring
|
Semiring
|
||||||
Bifunctor
|
Bifunctor
|
||||||
Exceptions
|
|
||||||
Panic
|
Panic
|
||||||
|
|
||||||
other-modules:
|
|
||||||
|
|
||||||
default-extensions:
|
default-extensions:
|
||||||
NoImplicitPrelude
|
NoImplicitPrelude
|
||||||
OverloadedStrings
|
OverloadedStrings
|
||||||
@@ -64,6 +64,7 @@ library
|
|||||||
|
|
||||||
build-depends:
|
build-depends:
|
||||||
base >= 4.6 && <4.10,
|
base >= 4.6 && <4.10,
|
||||||
|
array >= 0.4 && <0.6,
|
||||||
ghc-prim >= 0.3 && <0.6,
|
ghc-prim >= 0.3 && <0.6,
|
||||||
async >= 2.0 && <2.2,
|
async >= 2.0 && <2.2,
|
||||||
deepseq >= 1.3 && <1.5,
|
deepseq >= 1.3 && <1.5,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ hush :: Alternative m => Either e a -> m a
|
|||||||
hush (Left _) = empty
|
hush (Left _) = empty
|
||||||
hush (Right x) = pure x
|
hush (Right x) = pure x
|
||||||
|
|
||||||
|
-- To suppress redundenet applicative constraint warning on GHC 8.0
|
||||||
#if ( __GLASGOW_HASKELL__ >= 800 )
|
#if ( __GLASGOW_HASKELL__ >= 800 )
|
||||||
note :: (MonadError e m) => e -> Maybe a -> m a
|
note :: (MonadError e m) => e -> Maybe a -> m a
|
||||||
note err = maybe (throwError err) pure
|
note err = maybe (throwError err) pure
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ module Functor (
|
|||||||
|
|
||||||
import Data.Function ((.))
|
import Data.Function ((.))
|
||||||
|
|
||||||
#if (__GLASGOW_HASKELL__ >= 710)
|
#if MIN_VERSION_base(4,7,0)
|
||||||
import Data.Functor (
|
import Data.Functor (
|
||||||
Functor(..)
|
Functor(..)
|
||||||
, ($>)
|
, ($>)
|
||||||
|
|||||||
+2
-5
@@ -42,12 +42,7 @@ module Monad (
|
|||||||
|
|
||||||
import Base (seq)
|
import Base (seq)
|
||||||
import Data.List (concat)
|
import Data.List (concat)
|
||||||
|
|
||||||
#if (__GLASGOW_HASKELL__ >= 710)
|
|
||||||
import Control.Monad hiding ((<$!>))
|
|
||||||
#else
|
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
#endif
|
|
||||||
|
|
||||||
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
|
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
|
||||||
concatMapM f xs = liftM concat (mapM f xs)
|
concatMapM f xs = liftM concat (mapM f xs)
|
||||||
@@ -64,9 +59,11 @@ liftM2' f a b = do
|
|||||||
z `seq` return z
|
z `seq` return z
|
||||||
{-# INLINE liftM2' #-}
|
{-# INLINE liftM2' #-}
|
||||||
|
|
||||||
|
#if !MIN_VERSION_base(4,8,0)
|
||||||
(<$!>) :: Monad m => (a -> b) -> m a -> m b
|
(<$!>) :: Monad m => (a -> b) -> m a -> m b
|
||||||
f <$!> m = do
|
f <$!> m = do
|
||||||
x <- m
|
x <- m
|
||||||
let z = f x
|
let z = f x
|
||||||
z `seq` return z
|
z `seq` return z
|
||||||
{-# INLINE (<$!>) #-}
|
{-# INLINE (<$!>) #-}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user