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
default-language: Haskell2010
build-depends: base >= 4.7 && < 5,
either == 4.4.1.1,
mtl == 2.2.1,
transformers == 0.5.5.0

View File

@ -1,56 +1,89 @@
{-# 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
import Control.Applicative as X
( Applicative (..)
( Applicative, (*>), (<*), (<*>), pure
, (<$>)
, pure
)
import Control.Arrow as X
( Arrow (..)
, ArrowChoice (..)
, ArrowLoop (..)
, ArrowMonad (..)
, ArrowPlus (..)
, ArrowZero (..)
( Arrow, (&&&), (***), arr, first, second
, ArrowChoice, (+++), (|||), left, right
, ArrowLoop, loop
, ArrowMonad
, ArrowPlus, (<+>)
, ArrowZero, zeroArrow
, (<<<)
, (>>>)
, returnA
)
import Control.Monad as X
( Monad (..)
, MonadPlus (..)
, filterM
( Monad, (>>=), (>>), return, fail
, MonadPlus, mplus, mzero
, guard
)
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
( MonadIO (..)
( MonadIO, liftIO
, lift
)
import Control.Monad.Trans.Either as X
( EitherT, runEitherT
)
import Control.Monad.Trans.Except as X
( ExceptT (..)
, runExceptT
-- Note runExceptT is not actually a type declaration within the ExceptT
-- newtype but writing as follows for consistency's sake.
( ExceptT, runExceptT
)
import Control.Monad.Trans.Maybe as X
( MaybeT (..)
( MaybeT, runMaybeT
)
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
( Bool (..)
( Bool, Bool(False), Bool(True)
, (&&)
, (||)
, not
@ -58,15 +91,15 @@ import Data.Bool as X
)
import Data.Char as X
( Char (..)
( Char
)
import Data.Either as X
( Either (..)
( Either, Either(Left), Either(Right)
)
import Data.Eq as X
( Eq (..)
( Eq, (/=), (==)
)
import Data.Function as X
@ -81,14 +114,14 @@ import Data.Function as X
)
import Data.Functor as X
( Functor (..)
( Functor, (<$), fmap
, ($>)
, (<$>)
, void
)
import Data.Functor.Identity as X
( Identity (..)
( Identity, runIdentity
)
import Data.Int as X
@ -114,16 +147,16 @@ import Data.List as X
)
import Data.Maybe as X
( Maybe (..)
( Maybe, Maybe(Just), Maybe(Nothing)
)
import Data.Monoid as X
( Monoid (..)
( Monoid, mappend, mconcat, mempty
)
import Data.Ord as X
( Ord (..)
, Ordering (..)
( Ord, (<), (<=), (>), (>=), compare, max, min
, Ordering, Ordering(EQ), Ordering(GT), Ordering(LT)
)
import Data.String as X
@ -131,12 +164,20 @@ import Data.String as X
)
import Data.Traversable as X
( Traversable (..)
( Traversable, mapM, sequence, sequenceA, traverse
)
import GHC.Enum as X
( Bounded (..)
, Enum (..)
( Bounded, maxBound, minBound
, Enum
, enumFrom
, enumFromThen
, enumFromThenTo
, enumFromTo
, fromEnum
, pred
, succ
, toEnum
)
import GHC.Err as X
@ -144,26 +185,62 @@ import GHC.Err as X
)
import GHC.Float as X
( Double (..)
, Float (..)
, Floating (..)
, RealFloat (..)
( Double
, Float
, Floating
, (**)
, 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
( Num (..)
( Num, (*), (+), (-), abs, fromInteger, negate, signum
, Integer
)
import GHC.Real as X
( Fractional (..)
, Integral (..)
, Ratio (..)
( Fractional, (/), fromRational, recip
, Integral, div, divMod, mod, quot, quotRem, rem, toInteger
, Ratio
, Rational
)
import GHC.Show as X
( Show (..)
( Show, show, showList, showsPrec
)
import System.Environment as X
@ -174,7 +251,11 @@ import System.IO as X
( FilePath
, Handle
, IO
, IOMode (..)
, IOMode
, IOMode(AppendMode)
, IOMode(ReadMode)
, IOMode(ReadWriteMode)
, IOMode(WriteMode)
, openFile
, print
, stderr