Merge branch 'docs'
Conflicts: CHANGES.md
This commit is contained in:
+8
-4
@@ -6,9 +6,12 @@ module Functor (
|
||||
Functor(..),
|
||||
($>),
|
||||
(<$>),
|
||||
(<<$>>),
|
||||
void,
|
||||
) where
|
||||
|
||||
import Data.Function ((.))
|
||||
|
||||
#if (__GLASGOW_HASKELL__ >= 710)
|
||||
import Data.Functor (
|
||||
Functor(..)
|
||||
@@ -23,16 +26,17 @@ import Data.Functor (
|
||||
)
|
||||
|
||||
import Data.Function (flip)
|
||||
import Data.Function ((.))
|
||||
|
||||
infixl 4 $>
|
||||
|
||||
($>) :: Functor f => f a -> b -> f b
|
||||
($>) = flip (<$)
|
||||
|
||||
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
|
||||
(<<$>>) = fmap . fmap
|
||||
|
||||
void :: Functor f => f a -> f ()
|
||||
void x = () <$ x
|
||||
#endif
|
||||
|
||||
infixl 4 <<$>>
|
||||
|
||||
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
|
||||
(<<$>>) = fmap . fmap
|
||||
|
||||
+33
-5
@@ -103,6 +103,10 @@ import Data.Functor.Identity as X
|
||||
|
||||
#if ( __GLASGOW_HASKELL__ >= 800 )
|
||||
import Data.Monoid as X
|
||||
import Data.List.NonEmpty as X (
|
||||
NonEmpty(..)
|
||||
, nonEmpty
|
||||
)
|
||||
import Data.Semigroup as X (
|
||||
Semigroup(sconcat, stimes)
|
||||
, WrappedMonoid
|
||||
@@ -201,6 +205,7 @@ import Data.Typeable as X (
|
||||
import Data.Type.Coercion as X (
|
||||
Coercion(..)
|
||||
, coerceWith
|
||||
, repr
|
||||
)
|
||||
|
||||
import Data.Type.Equality as X (
|
||||
@@ -223,7 +228,7 @@ import Data.Void as X (
|
||||
import Control.Monad.State as X (
|
||||
MonadState
|
||||
, State
|
||||
, StateT
|
||||
, StateT(StateT)
|
||||
, put
|
||||
, get
|
||||
, gets
|
||||
@@ -243,7 +248,7 @@ import Control.Monad.State as X (
|
||||
import Control.Monad.Reader as X (
|
||||
MonadReader
|
||||
, Reader
|
||||
, ReaderT
|
||||
, ReaderT(ReaderT)
|
||||
, ask
|
||||
, asks
|
||||
, local
|
||||
@@ -255,7 +260,7 @@ import Control.Monad.Reader as X (
|
||||
import Control.Monad.Except as X (
|
||||
MonadError
|
||||
, Except
|
||||
, ExceptT
|
||||
, ExceptT(ExceptT)
|
||||
, throwError
|
||||
, catchError
|
||||
, runExcept
|
||||
@@ -274,7 +279,19 @@ import Data.Bits as X hiding (
|
||||
unsafeShiftL
|
||||
, unsafeShiftR
|
||||
)
|
||||
import Data.Word as X
|
||||
import Data.Word as X (
|
||||
Word
|
||||
, Word16
|
||||
, Word32
|
||||
, Word64
|
||||
, Word8
|
||||
#if (__GLASGOW_HASKELL__ >= 710)
|
||||
, byteSwap16
|
||||
, byteSwap32
|
||||
, byteSwap64
|
||||
#endif
|
||||
)
|
||||
|
||||
import Data.Either as X
|
||||
import Data.Complex as X
|
||||
import Data.Char as X (chr)
|
||||
@@ -293,6 +310,7 @@ import Data.Function as X (
|
||||
-- Genericss
|
||||
import GHC.Generics as X (
|
||||
Generic(..)
|
||||
, Generic1
|
||||
, Rep
|
||||
, K1(..)
|
||||
, M1(..)
|
||||
@@ -341,6 +359,16 @@ import Data.Text.Encoding as X (
|
||||
, decodeUtf8With
|
||||
)
|
||||
|
||||
import Data.Text.Encoding.Error as X (
|
||||
OnDecodeError
|
||||
, OnError
|
||||
, UnicodeException
|
||||
, lenientDecode
|
||||
, strictDecode
|
||||
, ignore
|
||||
, replace
|
||||
)
|
||||
|
||||
-- IO
|
||||
import System.Exit as X
|
||||
import System.Environment as X (getArgs)
|
||||
@@ -403,7 +431,7 @@ map :: Functor f => (a -> b) -> f a -> f b
|
||||
map = fmap
|
||||
|
||||
uncons :: [a] -> Maybe (a, [a])
|
||||
uncons [] = Nothing
|
||||
uncons [] = Nothing
|
||||
uncons (x:xs) = Just (x, xs)
|
||||
|
||||
unsnoc :: [x] -> Maybe ([x],x)
|
||||
|
||||
Reference in New Issue
Block a user