1
Fork 0

Explicit exports and add additional transformers.

master
Joshua Potter 2017-12-10 14:34:36 -08:00
parent febd86dfed
commit a2340df867
2 changed files with 122 additions and 40 deletions

View File

@ -18,5 +18,6 @@ library
hs-source-dirs: src hs-source-dirs: src
default-language: Haskell2010 default-language: Haskell2010
build-depends: base >= 4.7 && < 5, build-depends: base >= 4.7 && < 5,
either == 4.4.1.1,
mtl == 2.2.1, mtl == 2.2.1,
transformers == 0.5.5.0 transformers == 0.5.5.0

View File

@ -1,56 +1,89 @@
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoImplicitPrelude #-}
-- The following maps all imports into a single module alias for easy exporting.
-- In all cases, we choose to explicitly list all exports (and avoid the use of
-- the .. syntactic construct) to make it clear what is being included when
-- importing the Postlude module.
--
-- It is generally expected one will add the -XNoImplicitPrelude pragma to the
-- file Postlude is being used in, and to import Postlude without any
-- qualification.
module Postlude (module X) where module Postlude (module X) where
import Control.Applicative as X import Control.Applicative as X
( Applicative (..) ( Applicative, (*>), (<*), (<*>), pure
, (<$>) , (<$>)
, pure
) )
import Control.Arrow as X import Control.Arrow as X
( Arrow (..) ( Arrow, (&&&), (***), arr, first, second
, ArrowChoice (..) , ArrowChoice, (+++), (|||), left, right
, ArrowLoop (..) , ArrowLoop, loop
, ArrowMonad (..) , ArrowMonad
, ArrowPlus (..) , ArrowPlus, (<+>)
, ArrowZero (..) , ArrowZero, zeroArrow
, (<<<) , (<<<)
, (>>>) , (>>>)
, returnA , returnA
) )
import Control.Monad as X import Control.Monad as X
( Monad (..) ( Monad, (>>=), (>>), return, fail
, MonadPlus (..) , MonadPlus, mplus, mzero
, filterM
, guard , guard
) )
import Control.Monad.Reader as X import Control.Monad.Reader as X
( MonadReader (..) ( MonadReader, ask, local, reader
, Reader
, runReader
)
import Control.Monad.State as X
( State
)
import Control.Monad.Writer as X
( Writer
) )
import Control.Monad.Trans as X import Control.Monad.Trans as X
( MonadIO (..) ( MonadIO, liftIO
, lift , lift
) )
import Control.Monad.Trans.Either as X
( EitherT, runEitherT
)
import Control.Monad.Trans.Except as X import Control.Monad.Trans.Except as X
( ExceptT (..) -- Note runExceptT is not actually a type declaration within the ExceptT
, runExceptT -- newtype but writing as follows for consistency's sake.
( ExceptT, runExceptT
) )
import Control.Monad.Trans.Maybe as X import Control.Monad.Trans.Maybe as X
( MaybeT (..) ( MaybeT, runMaybeT
) )
import Control.Monad.Trans.Reader as X import Control.Monad.Trans.Reader as X
( ReaderT (..) ( ReaderT, runReaderT
)
-- Note there also exists a strict interpretation but we default to the lazy
-- implementation.
import Control.Monad.Trans.State as X
( StateT, runStateT
)
-- Note there also exists a strict interpretation but we default to the lazy
-- implementation.
import Control.Monad.Trans.Writer as X
( WriterT, runWriterT
) )
import Data.Bool as X import Data.Bool as X
( Bool (..) ( Bool, Bool(False), Bool(True)
, (&&) , (&&)
, (||) , (||)
, not , not
@ -58,15 +91,15 @@ import Data.Bool as X
) )
import Data.Char as X import Data.Char as X
( Char (..) ( Char
) )
import Data.Either as X import Data.Either as X
( Either (..) ( Either, Either(Left), Either(Right)
) )
import Data.Eq as X import Data.Eq as X
( Eq (..) ( Eq, (/=), (==)
) )
import Data.Function as X import Data.Function as X
@ -81,14 +114,14 @@ import Data.Function as X
) )
import Data.Functor as X import Data.Functor as X
( Functor (..) ( Functor, (<$), fmap
, ($>) , ($>)
, (<$>) , (<$>)
, void , void
) )
import Data.Functor.Identity as X import Data.Functor.Identity as X
( Identity (..) ( Identity, runIdentity
) )
import Data.Int as X import Data.Int as X
@ -114,16 +147,16 @@ import Data.List as X
) )
import Data.Maybe as X import Data.Maybe as X
( Maybe (..) ( Maybe, Maybe(Just), Maybe(Nothing)
) )
import Data.Monoid as X import Data.Monoid as X
( Monoid (..) ( Monoid, mappend, mconcat, mempty
) )
import Data.Ord as X import Data.Ord as X
( Ord (..) ( Ord, (<), (<=), (>), (>=), compare, max, min
, Ordering (..) , Ordering, Ordering(EQ), Ordering(GT), Ordering(LT)
) )
import Data.String as X import Data.String as X
@ -131,12 +164,20 @@ import Data.String as X
) )
import Data.Traversable as X import Data.Traversable as X
( Traversable (..) ( Traversable, mapM, sequence, sequenceA, traverse
) )
import GHC.Enum as X import GHC.Enum as X
( Bounded (..) ( Bounded, maxBound, minBound
, Enum (..) , Enum
, enumFrom
, enumFromThen
, enumFromThenTo
, enumFromTo
, fromEnum
, pred
, succ
, toEnum
) )
import GHC.Err as X import GHC.Err as X
@ -144,26 +185,62 @@ import GHC.Err as X
) )
import GHC.Float as X import GHC.Float as X
( Double (..) ( Double
, Float (..) , Float
, Floating (..) , Floating
, RealFloat (..) , (**)
, acos
, acosh
, asin
, asinh
, atan
, atanh
, cos
, cosh
, exp
, expm1
, log
, log1mexp
, log1p
, log1pexp
, logBase
, pi
, sin
, sinh
, sqrt
, tan
, tanh
, RealFloat
, atan2
, decodeFloat
, encodeFloat
, exponent
, floatDigits
, floatRadix
, floatRange
, isDenormalized
, isIEEE
, isInfinite
, isNaN
, isNegativeZero
, scaleFloat
, significand
) )
import GHC.Num as X import GHC.Num as X
( Num (..) ( Num, (*), (+), (-), abs, fromInteger, negate, signum
, Integer , Integer
) )
import GHC.Real as X import GHC.Real as X
( Fractional (..) ( Fractional, (/), fromRational, recip
, Integral (..) , Integral, div, divMod, mod, quot, quotRem, rem, toInteger
, Ratio (..) , Ratio
, Rational , Rational
) )
import GHC.Show as X import GHC.Show as X
( Show (..) ( Show, show, showList, showsPrec
) )
import System.Environment as X import System.Environment as X
@ -174,7 +251,11 @@ import System.IO as X
( FilePath ( FilePath
, Handle , Handle
, IO , IO
, IOMode (..) , IOMode
, IOMode(AppendMode)
, IOMode(ReadMode)
, IOMode(ReadWriteMode)
, IOMode(WriteMode)
, openFile , openFile
, print , print
, stderr , stderr