bring 7.10 type-level equality into scope

This commit is contained in:
Stephen Diehl
2016-04-18 11:09:03 -04:00
parent da7da2fe75
commit 4b3caa5c18
3 changed files with 29 additions and 7 deletions
+4 -2
View File
@@ -12,9 +12,11 @@ Design points:
* Banishes partial functions.
* Compiler warning on bottoms.
* Polymorphic string IO functions.
* Polymorphic show.
* Automatic string conversions.
* Type synonyms for major data structures.
* Basic monad transformers in scope by default.
* Type for common data structures in scope.
* Type for all common string types in scope.
* StateT/ReaderT/ExceptT transformers in scope by default.
* 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.
+2 -2
View File
@@ -48,8 +48,8 @@ import Control.Monad hiding ((<$!>))
import Control.Monad
#endif
concatMapM :: (Monad m) => (a -> m [b]) -> [a] -> m [b]
concatMapM f xs = liftM concat (mapM f xs)
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
concatMapM f xs = fmap concat (mapM f xs)
liftM' :: Monad m => (a -> b) -> m a -> m b
liftM' = (<$!>)
+23 -3
View File
@@ -1,6 +1,7 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ExplicitNamespaces #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Protolude (
@@ -129,6 +130,7 @@ import Data.List as X (
, zipWith
, zip
)
import Data.Map as X (Map)
import Data.Set as X (Set)
import Data.Sequence as X (Seq)
@@ -140,6 +142,24 @@ import Data.Proxy as X (
Proxy(..)
)
import Data.Typeable as X (
TypeRep,
)
import Data.Type.Coercion as X (
Coercion(..)
, coerceWith
)
import Data.Type.Equality as X (
(:~:)(..)
, type (==)
, sym
, trans
, castWith
, gcastWith
)
import Data.Void as X (
Void
, absurd
@@ -198,11 +218,11 @@ import Control.Monad.Trans as X (
import Data.Int as X
import Data.Bits as X
import Data.Word as X
import Data.Bool as X hiding (bool)
import Data.Char as X (chr)
import Data.Maybe as X hiding (fromJust)
import Data.Either as X
import Data.Complex as X
import Data.Char as X (chr)
import Data.Bool as X hiding (bool)
import Data.Maybe as X hiding (fromJust)
import Data.Function as X (
const