classy-prelude-1.2.0.1: A typeclass-based Prelude.

Safe HaskellNone
LanguageHaskell98

ClassyPrelude

Contents

Synopsis

CorePrelude

undefined :: HasCallStack => a Source #

Deprecated: It is highly recommended that you either avoid partial functions or provide meaningful error messages

We define our own undefined which is marked as deprecated. This makes it useful to use during development, but lets you more easily get notifications if you accidentally ship partial code in production.

The classy prelude recommendation for when you need to really have a partial function in production is to use error with a very descriptive message so that, in case an exception is thrown, you get more information than Prelude.undefined.

Since 0.5.5

Standard

Monoid

(++) :: Monoid m => m -> m -> m infixr 5 Source #

Semigroup

class Semigroup a where #

The class of semigroups (types with an associative binary operation).

Since: 4.9.0.0

Methods

(<>) :: a -> a -> a infixr 6 #

An associative operation.

(a <> b) <> c = a <> (b <> c)

If a is also a Monoid we further require

(<>) = mappend

sconcat :: NonEmpty a -> a #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

stimes :: Integral b => b -> a -> a #

Repeat a value n times.

Given that this works on a Semigroup it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so.

By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in O(1) by picking stimes = stimesIdempotent or stimes = stimesIdempotentMonoid respectively.

Instances

Semigroup Ordering 
Semigroup () 

Methods

(<>) :: () -> () -> () #

sconcat :: NonEmpty () -> () #

stimes :: Integral b => b -> () -> () #

Semigroup Void 

Methods

(<>) :: Void -> Void -> Void #

sconcat :: NonEmpty Void -> Void #

stimes :: Integral b => b -> Void -> Void #

Semigroup All 

Methods

(<>) :: All -> All -> All #

sconcat :: NonEmpty All -> All #

stimes :: Integral b => b -> All -> All #

Semigroup Any 

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Semigroup IntSet 
Semigroup ByteString 
Semigroup ShortByteString 
Semigroup ByteString 
Semigroup [a] 

Methods

(<>) :: [a] -> [a] -> [a] #

sconcat :: NonEmpty [a] -> [a] #

stimes :: Integral b => b -> [a] -> [a] #

Semigroup a => Semigroup (Maybe a) 

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Semigroup a => Semigroup (Concurrently a)

Only defined by async for base >= 4.9

Since: 2.1.0

Semigroup a => Semigroup (Identity a) 

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

Ord a => Semigroup (Min a) 

Methods

(<>) :: Min a -> Min a -> Min a #

sconcat :: NonEmpty (Min a) -> Min a #

stimes :: Integral b => b -> Min a -> Min a #

Ord a => Semigroup (Max a) 

Methods

(<>) :: Max a -> Max a -> Max a #

sconcat :: NonEmpty (Max a) -> Max a #

stimes :: Integral b => b -> Max a -> Max a #

Semigroup (First a) 

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a) 

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Monoid m => Semigroup (WrappedMonoid m) 
Semigroup a => Semigroup (Option a) 

Methods

(<>) :: Option a -> Option a -> Option a #

sconcat :: NonEmpty (Option a) -> Option a #

stimes :: Integral b => b -> Option a -> Option a #

Semigroup (NonEmpty a) 

Methods

(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #

sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #

stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

Semigroup a => Semigroup (Dual a) 

Methods

(<>) :: Dual a -> Dual a -> Dual a #

sconcat :: NonEmpty (Dual a) -> Dual a #

stimes :: Integral b => b -> Dual a -> Dual a #

Semigroup (Endo a) 

Methods

(<>) :: Endo a -> Endo a -> Endo a #

sconcat :: NonEmpty (Endo a) -> Endo a #

stimes :: Integral b => b -> Endo a -> Endo a #

Num a => Semigroup (Sum a) 

Methods

(<>) :: Sum a -> Sum a -> Sum a #

sconcat :: NonEmpty (Sum a) -> Sum a #

stimes :: Integral b => b -> Sum a -> Sum a #

Num a => Semigroup (Product a) 

Methods

(<>) :: Product a -> Product a -> Product a #

sconcat :: NonEmpty (Product a) -> Product a #

stimes :: Integral b => b -> Product a -> Product a #

Semigroup (First a) 

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a) 

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Semigroup (Vector a) 

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

(Hashable a, Eq a) => Semigroup (HashSet a) 

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a #

sconcat :: NonEmpty (HashSet a) -> HashSet a #

stimes :: Integral b => b -> HashSet a -> HashSet a #

Ord a => Semigroup (Set a) 

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Semigroup (Seq a) 

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

Semigroup (IntMap a) 

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a #

sconcat :: NonEmpty (IntMap a) -> IntMap a #

stimes :: Integral b => b -> IntMap a -> IntMap a #

Semigroup (DList a) 

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

(Semigroup mono, GrowingAppend mono) => Semigroup (NonNull mono) 

Methods

(<>) :: NonNull mono -> NonNull mono -> NonNull mono #

sconcat :: NonEmpty (NonNull mono) -> NonNull mono #

stimes :: Integral b => b -> NonNull mono -> NonNull mono #

Storable a => Semigroup (Vector a) 

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Prim a => Semigroup (Vector a) 

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Semigroup b => Semigroup (a -> b) 

Methods

(<>) :: (a -> b) -> (a -> b) -> a -> b #

sconcat :: NonEmpty (a -> b) -> a -> b #

stimes :: Integral b => b -> (a -> b) -> a -> b #

Semigroup (Either a b) 

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b => b -> Either a b -> Either a b #

(Semigroup a, Semigroup b) => Semigroup (a, b) 

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) #

sconcat :: NonEmpty (a, b) -> (a, b) #

stimes :: Integral b => b -> (a, b) -> (a, b) #

Semigroup (Proxy k s) 

Methods

(<>) :: Proxy k s -> Proxy k s -> Proxy k s #

sconcat :: NonEmpty (Proxy k s) -> Proxy k s #

stimes :: Integral b => b -> Proxy k s -> Proxy k s #

(Eq k, Hashable k) => Semigroup (HashMap k v) 

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v #

stimes :: Integral b => b -> HashMap k v -> HashMap k v #

Ord k => Semigroup (Map k v) 

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

Apply f => Semigroup (Act f a) 

Methods

(<>) :: Act f a -> Act f a -> Act f a #

sconcat :: NonEmpty (Act f a) -> Act f a #

stimes :: Integral b => b -> Act f a -> Act f a #

(MonadBaseControl IO m, Semigroup a, Forall * (Pure m)) => Semigroup (Concurrently m a) 

Methods

(<>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #

sconcat :: NonEmpty (Concurrently m a) -> Concurrently m a #

stimes :: Integral b => b -> Concurrently m a -> Concurrently m a #

(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) 

Methods

(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) #

stimes :: Integral b => b -> (a, b, c) -> (a, b, c) #

Semigroup a => Semigroup (Const k a b) 

Methods

(<>) :: Const k a b -> Const k a b -> Const k a b #

sconcat :: NonEmpty (Const k a b) -> Const k a b #

stimes :: Integral b => b -> Const k a b -> Const k a b #

Alternative f => Semigroup (Alt * f a) 

Methods

(<>) :: Alt * f a -> Alt * f a -> Alt * f a #

sconcat :: NonEmpty (Alt * f a) -> Alt * f a #

stimes :: Integral b => b -> Alt * f a -> Alt * f a #

Semigroup a => Semigroup (Tagged k s a) 

Methods

(<>) :: Tagged k s a -> Tagged k s a -> Tagged k s a #

sconcat :: NonEmpty (Tagged k s a) -> Tagged k s a #

stimes :: Integral b => b -> Tagged k s a -> Tagged k s a #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) 

Methods

(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) #

stimes :: Integral b => b -> (a, b, c, d) -> (a, b, c, d) #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) 

Methods

(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) #

stimes :: Integral b => b -> (a, b, c, d, e) -> (a, b, c, d, e) #

data WrappedMonoid m :: * -> * #

Provide a Semigroup for an arbitrary Monoid.

Instances

Generic1 WrappedMonoid 

Associated Types

type Rep1 (WrappedMonoid :: * -> *) :: * -> * #

Bounded a => Bounded (WrappedMonoid a) 
Enum a => Enum (WrappedMonoid a) 
Eq m => Eq (WrappedMonoid m) 
Data m => Data (WrappedMonoid m) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonoid m -> c (WrappedMonoid m) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m) #

toConstr :: WrappedMonoid m -> Constr #

dataTypeOf :: WrappedMonoid m -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m)) #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedMonoid m -> m (WrappedMonoid m) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedMonoid m -> m (WrappedMonoid m) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedMonoid m -> m (WrappedMonoid m) #

Ord m => Ord (WrappedMonoid m) 
Read m => Read (WrappedMonoid m) 
Show m => Show (WrappedMonoid m) 
Generic (WrappedMonoid m) 

Associated Types

type Rep (WrappedMonoid m) :: * -> * #

Monoid m => Semigroup (WrappedMonoid m) 
Monoid m => Monoid (WrappedMonoid m) 
Hashable a => Hashable (WrappedMonoid a) 
NFData m => NFData (WrappedMonoid m)

Since: 1.4.2.0

Methods

rnf :: WrappedMonoid m -> () #

type Rep1 WrappedMonoid 
type Rep1 WrappedMonoid = D1 (MetaData "WrappedMonoid" "Data.Semigroup" "base" True) (C1 (MetaCons "WrapMonoid" PrefixI True) (S1 (MetaSel (Just Symbol "unwrapMonoid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))
type Rep (WrappedMonoid m) 
type Rep (WrappedMonoid m) = D1 (MetaData "WrappedMonoid" "Data.Semigroup" "base" True) (C1 (MetaCons "WrapMonoid" PrefixI True) (S1 (MetaSel (Just Symbol "unwrapMonoid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 m)))

Functor

Applicative

(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 3 Source #

&& lifted to an Applicative.

Since: 0.12.8

(<||>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 2 Source #

|| lifted to an Applicative.

Since: 0.12.8

Monad

whenM :: Monad m => m Bool -> m () -> m () Source #

Only perform the action if the predicate returns True.

Since 0.9.2

unlessM :: Monad m => m Bool -> m () -> m () Source #

Only perform the action if the predicate returns False.

Since 0.9.2

Mutable references

atomically :: MonadIO m => STM a -> m a Source #

Generalized version of atomically.

alwaysSTM :: STM Bool -> STM () Source #

Synonym for always.

retrySTM :: STM a Source #

Synonym for retry.

orElseSTM :: STM a -> STM a -> STM a Source #

Synonym for orElse.

checkSTM :: Bool -> STM () Source #

Synonym for check.

STM Channels

Primitive (exported since 0.9.4)

primToPrim :: (PrimBase m1, PrimMonad m2, (~) * (PrimState m1) (PrimState m2)) => m1 a -> m2 a #

Convert a PrimBase to another monad with the same state token.

primToIO :: (PrimBase m, (~) * (PrimState m) RealWorld) => m a -> IO a #

Convert a PrimBase with a RealWorld state token to IO

primToST :: PrimBase m => m a -> ST (PrimState m) a #

Convert a PrimBase to ST

Debugging

trace :: String -> a -> a #

The trace function outputs the trace message given as its first argument, before returning the second argument as its result.

For example, this returns the value of f x but first outputs the message.

trace ("calling f with x = " ++ show x) (f x)

The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.

traceShow :: Show a => a -> b -> b #

Like trace, but uses show on the argument to convert it to a String.

This makes it convenient for printing the values of interesting variables or expressions inside a function. For example here we print the value of the variables x and z:

f x y =
    traceShow (x, z) $ result
  where
    z = ...
    ...

traceId :: String -> String Source #

Since 0.5.9

traceM :: Monad m => String -> m () Source #

Since 0.5.9

traceShowId :: Show a => a -> a Source #

Since 0.5.9

traceShowM :: (Show a, Monad m) => a -> m () Source #

Since 0.5.9

assert :: Bool -> a -> a #

If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert.

Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.

Time (since 0.6.1)

module Data.Time

defaultTimeLocale :: TimeLocale #

Locale representing American usage.

knownTimeZones contains only the ten time-zones mentioned in RFC 822 sec. 5: "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT". Note that the parsing functions will regardless parse single-letter military time-zones and +HHMM format.

Generics (since 0.8.1)

class Generic a #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

Minimal complete definition

from, to

Instances

Generic Bool 

Associated Types

type Rep Bool :: * -> * #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic Ordering 

Associated Types

type Rep Ordering :: * -> * #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic Exp 

Associated Types

type Rep Exp :: * -> * #

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Generic Match 

Associated Types

type Rep Match :: * -> * #

Methods

from :: Match -> Rep Match x #

to :: Rep Match x -> Match #

Generic Clause 

Associated Types

type Rep Clause :: * -> * #

Methods

from :: Clause -> Rep Clause x #

to :: Rep Clause x -> Clause #

Generic Pat 

Associated Types

type Rep Pat :: * -> * #

Methods

from :: Pat -> Rep Pat x #

to :: Rep Pat x -> Pat #

Generic Type 

Associated Types

type Rep Type :: * -> * #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

Generic Dec 

Associated Types

type Rep Dec :: * -> * #

Methods

from :: Dec -> Rep Dec x #

to :: Rep Dec x -> Dec #

Generic Name 

Associated Types

type Rep Name :: * -> * #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic FunDep 

Associated Types

type Rep FunDep :: * -> * #

Methods

from :: FunDep -> Rep FunDep x #

to :: Rep FunDep x -> FunDep #

Generic TyVarBndr 

Associated Types

type Rep TyVarBndr :: * -> * #

Generic InjectivityAnn 

Associated Types

type Rep InjectivityAnn :: * -> * #

Generic Overlap 

Associated Types

type Rep Overlap :: * -> * #

Methods

from :: Overlap -> Rep Overlap x #

to :: Rep Overlap x -> Overlap #

Generic () 

Associated Types

type Rep () :: * -> * #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Void 

Associated Types

type Rep Void :: * -> * #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic Version 

Associated Types

type Rep Version :: * -> * #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic ExitCode 

Associated Types

type Rep ExitCode :: * -> * #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Generic All 

Associated Types

type Rep All :: * -> * #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Generic Any 

Associated Types

type Rep Any :: * -> * #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Generic Fixity 

Associated Types

type Rep Fixity :: * -> * #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic Associativity 

Associated Types

type Rep Associativity :: * -> * #

Generic SourceUnpackedness 
Generic SourceStrictness 
Generic DecidedStrictness 
Generic Extension 

Associated Types

type Rep Extension :: * -> * #

Generic ModName 

Associated Types

type Rep ModName :: * -> * #

Methods

from :: ModName -> Rep ModName x #

to :: Rep ModName x -> ModName #

Generic PkgName 

Associated Types

type Rep PkgName :: * -> * #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

Generic Module 

Associated Types

type Rep Module :: * -> * #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Generic OccName 

Associated Types

type Rep OccName :: * -> * #

Methods

from :: OccName -> Rep OccName x #

to :: Rep OccName x -> OccName #

Generic NameFlavour 

Associated Types

type Rep NameFlavour :: * -> * #

Generic NameSpace 

Associated Types

type Rep NameSpace :: * -> * #

Generic Loc 

Associated Types

type Rep Loc :: * -> * #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Generic Info 

Associated Types

type Rep Info :: * -> * #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

Generic ModuleInfo 

Associated Types

type Rep ModuleInfo :: * -> * #

Generic Fixity 

Associated Types

type Rep Fixity :: * -> * #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic FixityDirection 
Generic Lit 

Associated Types

type Rep Lit :: * -> * #

Methods

from :: Lit -> Rep Lit x #

to :: Rep Lit x -> Lit #

Generic Body 

Associated Types

type Rep Body :: * -> * #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

Generic Guard 

Associated Types

type Rep Guard :: * -> * #

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Generic Stmt 

Associated Types

type Rep Stmt :: * -> * #

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Generic Range 

Associated Types

type Rep Range :: * -> * #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Generic TypeFamilyHead 

Associated Types

type Rep TypeFamilyHead :: * -> * #

Generic TySynEqn 

Associated Types

type Rep TySynEqn :: * -> * #

Methods

from :: TySynEqn -> Rep TySynEqn x #

to :: Rep TySynEqn x -> TySynEqn #

Generic FamFlavour 

Associated Types

type Rep FamFlavour :: * -> * #

Generic Foreign 

Associated Types

type Rep Foreign :: * -> * #

Methods

from :: Foreign -> Rep Foreign x #

to :: Rep Foreign x -> Foreign #

Generic Callconv 

Associated Types

type Rep Callconv :: * -> * #

Methods

from :: Callconv -> Rep Callconv x #

to :: Rep Callconv x -> Callconv #

Generic Safety 

Associated Types

type Rep Safety :: * -> * #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

Generic Pragma 

Associated Types

type Rep Pragma :: * -> * #

Methods

from :: Pragma -> Rep Pragma x #

to :: Rep Pragma x -> Pragma #

Generic Inline 

Associated Types

type Rep Inline :: * -> * #

Methods

from :: Inline -> Rep Inline x #

to :: Rep Inline x -> Inline #

Generic RuleMatch 

Associated Types

type Rep RuleMatch :: * -> * #

Generic Phases 

Associated Types

type Rep Phases :: * -> * #

Methods

from :: Phases -> Rep Phases x #

to :: Rep Phases x -> Phases #

Generic RuleBndr 

Associated Types

type Rep RuleBndr :: * -> * #

Methods

from :: RuleBndr -> Rep RuleBndr x #

to :: Rep RuleBndr x -> RuleBndr #

Generic AnnTarget 

Associated Types

type Rep AnnTarget :: * -> * #

Generic SourceUnpackedness 
Generic SourceStrictness 
Generic DecidedStrictness 
Generic Con 

Associated Types

type Rep Con :: * -> * #

Methods

from :: Con -> Rep Con x #

to :: Rep Con x -> Con #

Generic Bang 

Associated Types

type Rep Bang :: * -> * #

Methods

from :: Bang -> Rep Bang x #

to :: Rep Bang x -> Bang #

Generic FamilyResultSig 
Generic TyLit 

Associated Types

type Rep TyLit :: * -> * #

Methods

from :: TyLit -> Rep TyLit x #

to :: Rep TyLit x -> TyLit #

Generic Role 

Associated Types

type Rep Role :: * -> * #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Generic AnnLookup 

Associated Types

type Rep AnnLookup :: * -> * #

Generic [a] 

Associated Types

type Rep [a] :: * -> * #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (Maybe a) 

Associated Types

type Rep (Maybe a) :: * -> * #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (V1 p) 

Associated Types

type Rep (V1 p) :: * -> * #

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (U1 p) 

Associated Types

type Rep (U1 p) :: * -> * #

Methods

from :: U1 p -> Rep (U1 p) x #

to :: Rep (U1 p) x -> U1 p #

Generic (Par1 p) 

Associated Types

type Rep (Par1 p) :: * -> * #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (Identity a) 

Associated Types

type Rep (Identity a) :: * -> * #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (Min a) 

Associated Types

type Rep (Min a) :: * -> * #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Generic (Max a) 

Associated Types

type Rep (Max a) :: * -> * #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Generic (First a) 

Associated Types

type Rep (First a) :: * -> * #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 

Associated Types

type Rep (Last a) :: * -> * #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (WrappedMonoid m) 

Associated Types

type Rep (WrappedMonoid m) :: * -> * #

Generic (Option a) 

Associated Types

type Rep (Option a) :: * -> * #

Methods

from :: Option a -> Rep (Option a) x #

to :: Rep (Option a) x -> Option a #

Generic (NonEmpty a) 

Associated Types

type Rep (NonEmpty a) :: * -> * #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

Generic (Complex a) 

Associated Types

type Rep (Complex a) :: * -> * #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

Generic (ZipList a) 

Associated Types

type Rep (ZipList a) :: * -> * #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Generic (Dual a) 

Associated Types

type Rep (Dual a) :: * -> * #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Generic (Endo a) 

Associated Types

type Rep (Endo a) :: * -> * #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Generic (Sum a) 

Associated Types

type Rep (Sum a) :: * -> * #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Generic (Product a) 

Associated Types

type Rep (Product a) :: * -> * #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Generic (First a) 

Associated Types

type Rep (First a) :: * -> * #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 

Associated Types

type Rep (Last a) :: * -> * #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Either a b) 

Associated Types

type Rep (Either a b) :: * -> * #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (Rec1 f p) 

Associated Types

type Rep (Rec1 f p) :: * -> * #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x #

to :: Rep (Rec1 f p) x -> Rec1 f p #

Generic (URec Char p) 

Associated Types

type Rep (URec Char p) :: * -> * #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Generic (URec Double p) 

Associated Types

type Rep (URec Double p) :: * -> * #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Generic (URec Float p) 

Associated Types

type Rep (URec Float p) :: * -> * #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Generic (URec Int p) 

Associated Types

type Rep (URec Int p) :: * -> * #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Generic (URec Word p) 

Associated Types

type Rep (URec Word p) :: * -> * #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Generic (URec (Ptr ()) p) 

Associated Types

type Rep (URec (Ptr ()) p) :: * -> * #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Generic (a, b) 

Associated Types

type Rep (a, b) :: * -> * #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (Arg a b) 

Associated Types

type Rep (Arg a b) :: * -> * #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

Generic (WrappedMonad m a) 

Associated Types

type Rep (WrappedMonad m a) :: * -> * #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Generic (Proxy k t) 

Associated Types

type Rep (Proxy k t) :: * -> * #

Methods

from :: Proxy k t -> Rep (Proxy k t) x #

to :: Rep (Proxy k t) x -> Proxy k t #

Generic (K1 i c p) 

Associated Types

type Rep (K1 i c p) :: * -> * #

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic ((:+:) f g p) 

Associated Types

type Rep ((:+:) f g p) :: * -> * #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

Generic ((:*:) f g p) 

Associated Types

type Rep ((:*:) f g p) :: * -> * #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

Generic ((:.:) f g p) 

Associated Types

type Rep ((:.:) f g p) :: * -> * #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Generic (a, b, c) 

Associated Types

type Rep (a, b, c) :: * -> * #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (WrappedArrow a b c) 

Associated Types

type Rep (WrappedArrow a b c) :: * -> * #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Generic (Const k a b) 

Associated Types

type Rep (Const k a b) :: * -> * #

Methods

from :: Const k a b -> Rep (Const k a b) x #

to :: Rep (Const k a b) x -> Const k a b #

Generic (Alt k f a) 

Associated Types

type Rep (Alt k f a) :: * -> * #

Methods

from :: Alt k f a -> Rep (Alt k f a) x #

to :: Rep (Alt k f a) x -> Alt k f a #

Generic (Join k p a) 

Associated Types

type Rep (Join k p a) :: * -> * #

Methods

from :: Join k p a -> Rep (Join k p a) x #

to :: Rep (Join k p a) x -> Join k p a #

Generic (Tagged k s b) 

Associated Types

type Rep (Tagged k s b) :: * -> * #

Methods

from :: Tagged k s b -> Rep (Tagged k s b) x #

to :: Rep (Tagged k s b) x -> Tagged k s b #

Generic (M1 i c f p) 

Associated Types

type Rep (M1 i c f p) :: * -> * #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x #

to :: Rep (M1 i c f p) x -> M1 i c f p #

Generic (a, b, c, d) 

Associated Types

type Rep (a, b, c, d) :: * -> * #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (Sum k f g a) 

Associated Types

type Rep (Sum k f g a) :: * -> * #

Methods

from :: Sum k f g a -> Rep (Sum k f g a) x #

to :: Rep (Sum k f g a) x -> Sum k f g a #

Generic (Product k f g a) 

Associated Types

type Rep (Product k f g a) :: * -> * #

Methods

from :: Product k f g a -> Rep (Product k f g a) x #

to :: Rep (Product k f g a) x -> Product k f g a #

Generic (a, b, c, d, e) 

Associated Types

type Rep (a, b, c, d, e) :: * -> * #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (Compose k1 k f g a) 

Associated Types

type Rep (Compose k1 k f g a) :: * -> * #

Methods

from :: Compose k1 k f g a -> Rep (Compose k1 k f g a) x #

to :: Rep (Compose k1 k f g a) x -> Compose k1 k f g a #

Generic (WrappedBifunctor k1 k p a b) 

Associated Types

type Rep (WrappedBifunctor k1 k p a b) :: * -> * #

Methods

from :: WrappedBifunctor k1 k p a b -> Rep (WrappedBifunctor k1 k p a b) x #

to :: Rep (WrappedBifunctor k1 k p a b) x -> WrappedBifunctor k1 k p a b #

Generic (Joker k1 k g a b) 

Associated Types

type Rep (Joker k1 k g a b) :: * -> * #

Methods

from :: Joker k1 k g a b -> Rep (Joker k1 k g a b) x #

to :: Rep (Joker k1 k g a b) x -> Joker k1 k g a b #

Generic (Flip k k1 p a b) 

Associated Types

type Rep (Flip k k1 p a b) :: * -> * #

Methods

from :: Flip k k1 p a b -> Rep (Flip k k1 p a b) x #

to :: Rep (Flip k k1 p a b) x -> Flip k k1 p a b #

Generic (Clown k1 k f a b) 

Associated Types

type Rep (Clown k1 k f a b) :: * -> * #

Methods

from :: Clown k1 k f a b -> Rep (Clown k1 k f a b) x #

to :: Rep (Clown k1 k f a b) x -> Clown k1 k f a b #

Generic (a, b, c, d, e, f) 

Associated Types

type Rep (a, b, c, d, e, f) :: * -> * #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (Product k1 k f g a b) 

Associated Types

type Rep (Product k1 k f g a b) :: * -> * #

Methods

from :: Product k1 k f g a b -> Rep (Product k1 k f g a b) x #

to :: Rep (Product k1 k f g a b) x -> Product k1 k f g a b #

Generic (Sum k1 k p q a b) 

Associated Types

type Rep (Sum k1 k p q a b) :: * -> * #

Methods

from :: Sum k1 k p q a b -> Rep (Sum k1 k p q a b) x #

to :: Rep (Sum k1 k p q a b) x -> Sum k1 k p q a b #

Generic (a, b, c, d, e, f, g) 

Associated Types

type Rep (a, b, c, d, e, f, g) :: * -> * #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

Generic (Tannen k2 k1 k f p a b) 

Associated Types

type Rep (Tannen k2 k1 k f p a b) :: * -> * #

Methods

from :: Tannen k2 k1 k f p a b -> Rep (Tannen k2 k1 k f p a b) x #

to :: Rep (Tannen k2 k1 k f p a b) x -> Tannen k2 k1 k f p a b #

Generic (Biff k3 k2 k1 k p f g a b) 

Associated Types

type Rep (Biff k3 k2 k1 k p f g a b) :: * -> * #

Methods

from :: Biff k3 k2 k1 k p f g a b -> Rep (Biff k3 k2 k1 k p f g a b) x #

to :: Rep (Biff k3 k2 k1 k p f g a b) x -> Biff k3 k2 k1 k p f g a b #

Transformers (since 0.9.4)

newtype Identity a :: * -> * #

Identity functor and monad. (a non-strict monad)

Since: 4.8.0.0

Constructors

Identity 

Fields

Instances

Monad Identity 

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b #

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

fail :: String -> Identity a #

Functor Identity 

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

MonadFix Identity 

Methods

mfix :: (a -> Identity a) -> Identity a #

Applicative Identity 

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Foldable Identity 

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Traversable Identity 

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Generic1 Identity 

Associated Types

type Rep1 (Identity :: * -> *) :: * -> * #

Methods

from1 :: Identity a -> Rep1 Identity a #

to1 :: Rep1 Identity a -> Identity a #

Representable Identity 

Associated Types

type Rep (Identity :: * -> *) :: * #

Methods

tabulate :: (Rep Identity -> a) -> Identity a #

index :: Identity a -> Rep Identity -> a #

Eq1 Identity 

Methods

liftEq :: (a -> b -> Bool) -> Identity a -> Identity b -> Bool #

Ord1 Identity 

Methods

liftCompare :: (a -> b -> Ordering) -> Identity a -> Identity b -> Ordering #

Read1 Identity 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Identity a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Identity a] #

Show1 Identity 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Identity a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Identity a] -> ShowS #

MonadZip Identity 

Methods

mzip :: Identity a -> Identity b -> Identity (a, b) #

mzipWith :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

munzip :: Identity (a, b) -> (Identity a, Identity b) #

Comonad Identity 

Methods

extract :: Identity a -> a #

duplicate :: Identity a -> Identity (Identity a) #

extend :: (Identity a -> b) -> Identity a -> Identity b #

ComonadApply Identity 

Methods

(<@>) :: Identity (a -> b) -> Identity a -> Identity b #

(@>) :: Identity a -> Identity b -> Identity b #

(<@) :: Identity a -> Identity b -> Identity a #

Hashable1 Identity 

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Identity a -> Int #

Keyed Identity 

Methods

mapWithKey :: (Key Identity -> a -> b) -> Identity a -> Identity b #

Zip Identity 

Methods

zipWith :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

zip :: Identity a -> Identity b -> Identity (a, b) #

zap :: Identity (a -> b) -> Identity a -> Identity b #

ZipWithKey Identity 

Methods

zipWithKey :: (Key Identity -> a -> b -> c) -> Identity a -> Identity b -> Identity c #

zapWithKey :: Identity (Key Identity -> a -> b) -> Identity a -> Identity b #

Indexable Identity 

Methods

index :: Identity a -> Key Identity -> a #

Lookup Identity 

Methods

lookup :: Key Identity -> Identity a -> Maybe a #

Adjustable Identity 

Methods

adjust :: (a -> a) -> Key Identity -> Identity a -> Identity a #

replace :: Key Identity -> a -> Identity a -> Identity a #

FoldableWithKey Identity 

Methods

toKeyedList :: Identity a -> [(Key Identity, a)] #

foldMapWithKey :: Monoid m => (Key Identity -> a -> m) -> Identity a -> m #

foldrWithKey :: (Key Identity -> a -> b -> b) -> b -> Identity a -> b #

foldlWithKey :: (b -> Key Identity -> a -> b) -> b -> Identity a -> b #

FoldableWithKey1 Identity 

Methods

foldMapWithKey1 :: Semigroup m => (Key Identity -> a -> m) -> Identity a -> m #

TraversableWithKey Identity 

Methods

traverseWithKey :: Applicative f => (Key Identity -> a -> f b) -> Identity a -> f (Identity b) #

mapWithKeyM :: Monad m => (Key Identity -> a -> m b) -> Identity a -> m (Identity b) #

TraversableWithKey1 Identity 

Methods

traverseWithKey1 :: Apply f => (Key Identity -> a -> f b) -> Identity a -> f (Identity b) #

Apply Identity 

Methods

(<.>) :: Identity (a -> b) -> Identity a -> Identity b #

(.>) :: Identity a -> Identity b -> Identity b #

(<.) :: Identity a -> Identity b -> Identity a #

Bind Identity 

Methods

(>>-) :: Identity a -> (a -> Identity b) -> Identity b #

join :: Identity (Identity a) -> Identity a #

MonadBase Identity Identity 

Methods

liftBase :: Identity α -> Identity α #

MonadBaseControl Identity Identity 

Associated Types

type StM (Identity :: * -> *) a :: * #

Bounded a => Bounded (Identity a) 
Enum a => Enum (Identity a) 
Eq a => Eq (Identity a) 

Methods

(==) :: Identity a -> Identity a -> Bool #

(/=) :: Identity a -> Identity a -> Bool #

Floating a => Floating (Identity a) 
Fractional a => Fractional (Identity a) 
Integral a => Integral (Identity a) 
Data a => Data (Identity a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Identity a -> c (Identity a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Identity a) #

toConstr :: Identity a -> Constr #

dataTypeOf :: Identity a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Identity a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Identity a)) #

gmapT :: (forall b. Data b => b -> b) -> Identity a -> Identity a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Identity a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Identity a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

Num a => Num (Identity a) 
Ord a => Ord (Identity a) 

Methods

compare :: Identity a -> Identity a -> Ordering #

(<) :: Identity a -> Identity a -> Bool #

(<=) :: Identity a -> Identity a -> Bool #

(>) :: Identity a -> Identity a -> Bool #

(>=) :: Identity a -> Identity a -> Bool #

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Real a => Real (Identity a) 

Methods

toRational :: Identity a -> Rational #

RealFloat a => RealFloat (Identity a) 
RealFrac a => RealFrac (Identity a) 

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

Ix a => Ix (Identity a) 
IsString a => IsString (Identity a) 

Methods

fromString :: String -> Identity a #

Generic (Identity a) 

Associated Types

type Rep (Identity a) :: * -> * #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Semigroup a => Semigroup (Identity a) 

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

Monoid a => Monoid (Identity a) 

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Storable a => Storable (Identity a) 

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Bits a => Bits (Identity a) 
FiniteBits a => FiniteBits (Identity a) 
Hashable a => Hashable (Identity a) 

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int #

NFData a => NFData (Identity a)

Since: 1.4.0.0

Methods

rnf :: Identity a -> () #

MonoFunctor (Identity a) 

Methods

omap :: (Element (Identity a) -> Element (Identity a)) -> Identity a -> Identity a #

MonoFoldable (Identity a) 

Methods

ofoldMap :: Monoid m => (Element (Identity a) -> m) -> Identity a -> m #

ofoldr :: (Element (Identity a) -> b -> b) -> b -> Identity a -> b #

ofoldl' :: (a -> Element (Identity a) -> a) -> a -> Identity a -> a #

otoList :: Identity a -> [Element (Identity a)] #

oall :: (Element (Identity a) -> Bool) -> Identity a -> Bool #

oany :: (Element (Identity a) -> Bool) -> Identity a -> Bool #

onull :: Identity a -> Bool #

olength :: Identity a -> Int #

olength64 :: Identity a -> Int64 #

ocompareLength :: Integral i => Identity a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Identity a) -> f b) -> Identity a -> f () #

ofor_ :: Applicative f => Identity a -> (Element (Identity a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Identity a) -> m ()) -> Identity a -> m () #

oforM_ :: Applicative m => Identity a -> (Element (Identity a) -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element (Identity a) -> m a) -> a -> Identity a -> m a #

ofoldMap1Ex :: Semigroup m => (Element (Identity a) -> m) -> Identity a -> m #

ofoldr1Ex :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Element (Identity a) #

ofoldl1Ex' :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Element (Identity a) #

headEx :: Identity a -> Element (Identity a) #

lastEx :: Identity a -> Element (Identity a) #

unsafeHead :: Identity a -> Element (Identity a) #

unsafeLast :: Identity a -> Element (Identity a) #

maximumByEx :: (Element (Identity a) -> Element (Identity a) -> Ordering) -> Identity a -> Element (Identity a) #

minimumByEx :: (Element (Identity a) -> Element (Identity a) -> Ordering) -> Identity a -> Element (Identity a) #

MonoTraversable (Identity a) 

Methods

otraverse :: Applicative f => (Element (Identity a) -> f (Element (Identity a))) -> Identity a -> f (Identity a) #

omapM :: Applicative m => (Element (Identity a) -> m (Element (Identity a))) -> Identity a -> m (Identity a) #

MonoPointed (Identity a) 

Methods

opoint :: Element (Identity a) -> Identity a #

type Rep1 Identity 
type Rep1 Identity = D1 (MetaData "Identity" "Data.Functor.Identity" "base" True) (C1 (MetaCons "Identity" PrefixI True) (S1 (MetaSel (Just Symbol "runIdentity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))
type Rep Identity 
type Rep Identity = ()
type Key Identity 
type Key Identity = ()
type StM Identity a 
type StM Identity a = a
type Rep (Identity a) 
type Rep (Identity a) = D1 (MetaData "Identity" "Data.Functor.Identity" "base" True) (C1 (MetaCons "Identity" PrefixI True) (S1 (MetaSel (Just Symbol "runIdentity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Element (Identity a) 
type Element (Identity a) = a

class Monad m => MonadReader r m | m -> r where #

See examples in Control.Monad.Reader. Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.

Minimal complete definition

(ask | reader), local

Methods

ask :: m r #

Retrieves the monad environment.

Instances

MonadReader r m => MonadReader r (MaybeT m) 

Methods

ask :: MaybeT m r #

local :: (r -> r) -> MaybeT m a -> MaybeT m a #

reader :: (r -> a) -> MaybeT m a #

MonadReader r m => MonadReader r (ListT m) 

Methods

ask :: ListT m r #

local :: (r -> r) -> ListT m a -> ListT m a #

reader :: (r -> a) -> ListT m a #

MonadReader r ((->) r) 

Methods

ask :: r -> r #

local :: (r -> r) -> (r -> a) -> r -> a #

reader :: (r -> a) -> r -> a #

(Functor m, MonadReader e m) => MonadReader e (Free m) 

Methods

ask :: Free m e #

local :: (e -> e) -> Free m a -> Free m a #

reader :: (e -> a) -> Free m a #

(Representable f, (~) * (Rep f) a) => MonadReader a (Co f) 

Methods

ask :: Co f a #

local :: (a -> a) -> Co f a -> Co f a #

reader :: (a -> a) -> Co f a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

MonadReader r m => MonadReader r (StateT s m) 

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

MonadReader r m => MonadReader r (StateT s m) 

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

MonadReader r m => MonadReader r (IdentityT * m) 

Methods

ask :: IdentityT * m r #

local :: (r -> r) -> IdentityT * m a -> IdentityT * m a #

reader :: (r -> a) -> IdentityT * m a #

MonadReader r m => MonadReader r (ExceptT e m) 

Methods

ask :: ExceptT e m r #

local :: (r -> r) -> ExceptT e m a -> ExceptT e m a #

reader :: (r -> a) -> ExceptT e m a #

(Error e, MonadReader r m) => MonadReader r (ErrorT e m) 

Methods

ask :: ErrorT e m r #

local :: (r -> r) -> ErrorT e m a -> ErrorT e m a #

reader :: (r -> a) -> ErrorT e m a #

Monad m => MonadReader r (ReaderT * r m) 

Methods

ask :: ReaderT * r m r #

local :: (r -> r) -> ReaderT * r m a -> ReaderT * r m a #

reader :: (r -> a) -> ReaderT * r m a #

MonadReader r' m => MonadReader r' (ContT * r m) 

Methods

ask :: ContT * r m r' #

local :: (r' -> r') -> ContT * r m a -> ContT * r m a #

reader :: (r' -> a) -> ContT * r m a #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) 

Methods

ask :: RWST r w s m r #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) 

Methods

ask :: RWST r w s m r #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

ask :: MonadReader r m => m r #

Retrieves the monad environment.

asks #

Arguments

:: MonadReader r m 
=> (r -> a)

The selector function to apply to the environment.

-> m a 

Retrieves a function of the current environment.

newtype ReaderT k r m a :: forall k. * -> (k -> *) -> k -> * #

The reader monad transformer, which adds a read-only environment to the given monad.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

Constructors

ReaderT 

Fields

Instances

Monad m => MonadReader r (ReaderT * r m) 

Methods

ask :: ReaderT * r m r #

local :: (r -> r) -> ReaderT * r m a -> ReaderT * r m a #

reader :: (r -> a) -> ReaderT * r m a #

MonadBase b m => MonadBase b (ReaderT * r m) 

Methods

liftBase :: b α -> ReaderT * r m α #

MonadBaseControl b m => MonadBaseControl b (ReaderT * r m) 

Associated Types

type StM (ReaderT * r m :: * -> *) a :: * #

Methods

liftBaseWith :: (RunInBase (ReaderT * r m) b -> b a) -> ReaderT * r m a #

restoreM :: StM (ReaderT * r m) a -> ReaderT * r m a #

MonadTrans (ReaderT * r) 

Methods

lift :: Monad m => m a -> ReaderT * r m a #

MonadTransControl (ReaderT * r) 

Associated Types

type StT (ReaderT * r :: (* -> *) -> * -> *) a :: * #

Methods

liftWith :: Monad m => (Run (ReaderT * r) -> m a) -> ReaderT * r m a #

restoreT :: Monad m => m (StT (ReaderT * r) a) -> ReaderT * r m a #

Monad m => Monad (ReaderT * r m) 

Methods

(>>=) :: ReaderT * r m a -> (a -> ReaderT * r m b) -> ReaderT * r m b #

(>>) :: ReaderT * r m a -> ReaderT * r m b -> ReaderT * r m b #

return :: a -> ReaderT * r m a #

fail :: String -> ReaderT * r m a #

Functor m => Functor (ReaderT * r m) 

Methods

fmap :: (a -> b) -> ReaderT * r m a -> ReaderT * r m b #

(<$) :: a -> ReaderT * r m b -> ReaderT * r m a #

MonadFix m => MonadFix (ReaderT * r m) 

Methods

mfix :: (a -> ReaderT * r m a) -> ReaderT * r m a #

MonadFail m => MonadFail (ReaderT * r m) 

Methods

fail :: String -> ReaderT * r m a #

Applicative m => Applicative (ReaderT * r m) 

Methods

pure :: a -> ReaderT * r m a #

(<*>) :: ReaderT * r m (a -> b) -> ReaderT * r m a -> ReaderT * r m b #

(*>) :: ReaderT * r m a -> ReaderT * r m b -> ReaderT * r m b #

(<*) :: ReaderT * r m a -> ReaderT * r m b -> ReaderT * r m a #

Representable m => Representable (ReaderT * e m) 

Associated Types

type Rep (ReaderT * e m :: * -> *) :: * #

Methods

tabulate :: (Rep (ReaderT * e m) -> a) -> ReaderT * e m a #

index :: ReaderT * e m a -> Rep (ReaderT * e m) -> a #

MonadZip m => MonadZip (ReaderT * r m) 

Methods

mzip :: ReaderT * r m a -> ReaderT * r m b -> ReaderT * r m (a, b) #

mzipWith :: (a -> b -> c) -> ReaderT * r m a -> ReaderT * r m b -> ReaderT * r m c #

munzip :: ReaderT * r m (a, b) -> (ReaderT * r m a, ReaderT * r m b) #

MonadIO m => MonadIO (ReaderT * r m) 

Methods

liftIO :: IO a -> ReaderT * r m a #

Alternative m => Alternative (ReaderT * r m) 

Methods

empty :: ReaderT * r m a #

(<|>) :: ReaderT * r m a -> ReaderT * r m a -> ReaderT * r m a #

some :: ReaderT * r m a -> ReaderT * r m [a] #

many :: ReaderT * r m a -> ReaderT * r m [a] #

MonadPlus m => MonadPlus (ReaderT * r m) 

Methods

mzero :: ReaderT * r m a #

mplus :: ReaderT * r m a -> ReaderT * r m a -> ReaderT * r m a #

Zip m => Zip (ReaderT * e m) 

Methods

zipWith :: (a -> b -> c) -> ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m c #

zip :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m (a, b) #

zap :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b #

unzip :: ReaderT * e m (a, b) -> (ReaderT * e m a, ReaderT * e m b) #

Keyed m => Keyed (ReaderT * e m) 

Methods

mapWithKey :: (Key (ReaderT * e m) -> a -> b) -> ReaderT * e m a -> ReaderT * e m b #

Zip m => Zip (ReaderT * e m) 

Methods

zipWith :: (a -> b -> c) -> ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m c #

zip :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m (a, b) #

zap :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b #

ZipWithKey m => ZipWithKey (ReaderT * e m) 

Methods

zipWithKey :: (Key (ReaderT * e m) -> a -> b -> c) -> ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m c #

zapWithKey :: ReaderT * e m (Key (ReaderT * e m) -> a -> b) -> ReaderT * e m a -> ReaderT * e m b #

Indexable m => Indexable (ReaderT * e m) 

Methods

index :: ReaderT * e m a -> Key (ReaderT * e m) -> a #

Lookup m => Lookup (ReaderT * e m) 

Methods

lookup :: Key (ReaderT * e m) -> ReaderT * e m a -> Maybe a #

PrimMonad m => PrimMonad (ReaderT * r m) 

Associated Types

type PrimState (ReaderT * r m :: * -> *) :: * #

Methods

primitive :: (State# (PrimState (ReaderT * r m)) -> (#VoidRep, PtrRepLifted, State# (PrimState (ReaderT * r m)), a#)) -> ReaderT * r m a #

Apply m => Apply (ReaderT * e m) 

Methods

(<.>) :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b #

(.>) :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m b #

(<.) :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m a #

Bind m => Bind (ReaderT * e m) 

Methods

(>>-) :: ReaderT * e m a -> (a -> ReaderT * e m b) -> ReaderT * e m b #

join :: ReaderT * e m (ReaderT * e m a) -> ReaderT * e m a #

Functor m => MonoFunctor (ReaderT * r m a) 

Methods

omap :: (Element (ReaderT * r m a) -> Element (ReaderT * r m a)) -> ReaderT * r m a -> ReaderT * r m a #

Applicative m => MonoPointed (ReaderT * r m a) 

Methods

opoint :: Element (ReaderT * r m a) -> ReaderT * r m a #

type StT (ReaderT * r) a 
type StT (ReaderT * r) a = a
type Rep (ReaderT * e m) 
type Rep (ReaderT * e m) = (e, Rep m)
type Key (ReaderT * e m) 
type Key (ReaderT * e m) = (e, Key m)
type PrimState (ReaderT * r m) 
type PrimState (ReaderT * r m) = PrimState m
type StM (ReaderT * r m) a 
type StM (ReaderT * r m) a = ComposeSt (ReaderT * r) m a
type Element (ReaderT * r m a) 
type Element (ReaderT * r m a) = a

type Reader r = ReaderT * r Identity #

The parameterizable reader monad.

Computations are functions of a shared environment.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

Poly hierarchy

Bifunctor (since 0.10.0)

Mono hierarchy

toByteVector :: ByteString -> SVector Word8 Source #

Convert a ByteString into a storable Vector.

I/O

data Handle :: * #

Haskell defines operations to read and write characters from and to files, represented by values of type Handle. Each value of this type is a handle: a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:

  • whether it manages input or output or both;
  • whether it is open, closed or semi-closed;
  • whether the object is seekable;
  • whether buffering is disabled, or enabled on a line or block basis;
  • a buffer (whose length may be zero).

Most handles will also have a current I/O position indicating where the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the Show and Eq classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to == only to itself; no attempt is made to compare the internal state of different handles for equality.

Instances

Eq Handle 

Methods

(==) :: Handle -> Handle -> Bool #

(/=) :: Handle -> Handle -> Bool #

Show Handle 

stdin :: Handle #

A handle managing input from the Haskell program's standard input channel.

stdout :: Handle #

A handle managing output to the Haskell program's standard output channel.

stderr :: Handle #

A handle managing output to the Haskell program's standard error channel.

module Say

Concurrency

yieldThread :: MonadBase IO m => m () Source #

Originally yield.

waitAsync :: MonadIO m => Async a -> m a Source #

waitSTM for any MonadIO

Since: 1.0.0

pollAsync :: MonadIO m => Async a -> m (Maybe (Either SomeException a)) Source #

pollSTM for any MonadIO

Since: 1.0.0

cancel :: MonadIO m => Async a -> m () Source #

cancel generalized to any MonadIO

Since: 1.0.0

cancelWith :: (MonadIO m, Exception e) => Async a -> e -> m () Source #

cancel an Async with the given exception. It is converted to an async exception via toAsyncException first.

Since: 1.0.0

linkAsync :: MonadIO m => Async a -> m () Source #

link generalized to any MonadIO

Since: 1.0.0

link2Async :: MonadIO m => Async a -> Async b -> m () Source #

link2 generalized to any MonadIO

Since: 1.0.0

Non-standard

List-like classes

map :: Functor f => (a -> b) -> f a -> f b Source #

readMay :: (Element c ~ Char, MonoFoldable c, Read a) => c -> Maybe a Source #

zip :: Zip f => forall a b. f a -> f b -> f (a, b) #

zip3 :: Zip3 f => forall a b c. f a -> f b -> f c -> f (a, b, c) #

zip4 :: Zip4 f => forall a b c d. f a -> f b -> f c -> f d -> f (a, b, c, d) #

zip5 :: Zip5 f => forall a b c d e. f a -> f b -> f c -> f d -> f e -> f (a, b, c, d, e) #

zip6 :: Zip6 f => forall a b c d e g. f a -> f b -> f c -> f d -> f e -> f g -> f (a, b, c, d, e, g) #

zip7 :: Zip7 f => forall a b c d e g h. f a -> f b -> f c -> f d -> f e -> f g -> f h -> f (a, b, c, d, e, g, h) #

unzip :: Zip f => forall a b. f (a, b) -> (f a, f b) #

unzip3 :: Zip3 f => forall a b c. f (a, b, c) -> (f a, f b, f c) #

unzip4 :: Zip4 f => forall a b c d. f (a, b, c, d) -> (f a, f b, f c, f d) #

unzip5 :: Zip5 f => forall a b c d e. f (a, b, c, d, e) -> (f a, f b, f c, f d, f e) #

unzip6 :: Zip6 f => forall a b c d e g. f (a, b, c, d, e, g) -> (f a, f b, f c, f d, f e, f g) #

unzip7 :: Zip7 f => forall a b c d e g h. f (a, b, c, d, e, g, h) -> (f a, f b, f c, f d, f e, f g, f h) #

zipWith :: Zip f => forall a b c. (a -> b -> c) -> f a -> f b -> f c #

zipWith3 :: Zip3 f => forall a b c d. (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

zipWith4 :: Zip4 f => forall a b c d e. (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e #

zipWith5 :: Zip5 f => forall a b c d e g. (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g #

zipWith6 :: Zip6 f => forall a b c d e g h. (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h #

zipWith7 :: Zip7 f => forall a b c d e g h i. (a -> b -> c -> d -> e -> g -> h -> i) -> f a -> f b -> f c -> f d -> f e -> f g -> f h -> f i #

hashNub :: (Hashable a, Eq a) => [a] -> [a] Source #

same behavior as nub, but requires Hashable & Eq and is O(n log n)

https://github.com/nh2/haskell-ordnub

ordNub :: Ord a => [a] -> [a] Source #

same behavior as nub, but requires Ord and is O(n log n)

https://github.com/nh2/haskell-ordnub

ordNubBy :: Ord b => (a -> b) -> (a -> a -> Bool) -> [a] -> [a] Source #

same behavior as nubBy, but requires Ord and is O(n log n)

https://github.com/nh2/haskell-ordnub

sortWith :: (Ord a, IsSequence c) => (Element c -> a) -> c -> c Source #

Sort elements using the user supplied function to project something out of each element. Inspired by http://hackage.haskell.org/packages/archive/base/latest/doc/html/GHC-Exts.html#v:sortWith.

repeat :: a -> [a] #

repeat x is an infinite list, with x the value of every element.

Set-like

(\\) :: SetContainer a => a -> a -> a infixl 9 Source #

An alias for difference.

intersect :: SetContainer a => a -> a -> a Source #

An alias for intersection.

Text-like

class Show a where #

Conversion of values to readable Strings.

Derived instances of Show have the following properties, which are compatible with derived instances of Read:

  • The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
  • If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

infixr 5 :^:
data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Show is equivalent to

instance (Show a) => Show (Tree a) where

       showsPrec d (Leaf m) = showParen (d > app_prec) $
            showString "Leaf " . showsPrec (app_prec+1) m
         where app_prec = 10

       showsPrec d (u :^: v) = showParen (d > up_prec) $
            showsPrec (up_prec+1) u .
            showString " :^: "      .
            showsPrec (up_prec+1) v
         where up_prec = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)".

Minimal complete definition

showsPrec | show

Methods

showsPrec :: Int -> a -> ShowS #

Convert a value to a readable String.

showsPrec should satisfy the law

showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

show :: a -> String #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

showList :: [a] -> ShowS #

The method showList is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined Show instance of the Char type, where values of type String should be shown in double quotes, rather than between square brackets.

Instances

Show Bool 

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Show Char 

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Show Int 

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Show Int8 

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

Show Int16 

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

Show Int32 

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Show Int64 

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Show Integer 
Show Ordering 
Show Word 

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Show Word8 

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Show Word16 
Show Word32 
Show Word64 
Show CallStack 
Show TypeRep 
Show Exp 

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Show Match 

Methods

showsPrec :: Int -> Match -> ShowS #

show :: Match -> String #

showList :: [Match] -> ShowS #

Show Clause 
Show Pat 

Methods

showsPrec :: Int -> Pat -> ShowS #

show :: Pat -> String #

showList :: [Pat] -> ShowS #

Show Type 

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Show Dec 

Methods

showsPrec :: Int -> Dec -> ShowS #

show :: Dec -> String #

showList :: [Dec] -> ShowS #

Show Name 

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Show FunDep 
Show TyVarBndr 
Show InjectivityAnn 
Show Overlap 
Show () 

Methods

showsPrec :: Int -> () -> ShowS #

show :: () -> String #

showList :: [()] -> ShowS #

Show TyCon 

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show Module 
Show TrName 
Show Handle 
Show ThreadId 
Show HandleType 

Methods

showsPrec :: Int -> HandleType -> ShowS #

show :: HandleType -> String #

showList :: [HandleType] -> ShowS #

Show Natural 
Show Void 

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

Show Version 
Show HandlePosn 
Show BlockReason 
Show ThreadStatus 
Show BlockedIndefinitelyOnMVar 
Show BlockedIndefinitelyOnSTM 
Show Deadlock 
Show AllocationLimitExceeded 
Show AssertionFailed 
Show SomeAsyncException 
Show AsyncException 
Show ArrayException 
Show ExitCode 
Show IOErrorType 
Show BufferMode 
Show Newline 
Show NewlineMode 
Show WordPtr 
Show IntPtr 
Show All 

Methods

showsPrec :: Int -> All -> ShowS #

show :: All -> String #

showList :: [All] -> ShowS #

Show Any 

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

Show Fixity 
Show Associativity 
Show SourceUnpackedness 
Show SourceStrictness 
Show DecidedStrictness 
Show MaskingState 
Show IOException 
Show ErrorCall 
Show ArithException 
Show SomeNat 
Show SomeSymbol 
Show GeneralCategory 
Show SomeException 
Show SrcLoc 
Show IntSet 
Show ByteString 
Show ShortByteString 
Show ByteString 
Show Extension 
Show NullError 

Methods

showsPrec :: Int -> NullError -> ShowS #

show :: NullError -> String #

showList :: [NullError] -> ShowS #

Show SyncExceptionWrapper 
Show AsyncExceptionWrapper 
Show ModName 
Show PkgName 
Show Module 
Show OccName 
Show NameFlavour 
Show NameSpace 
Show Loc 

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Show Info 

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Show ModuleInfo 
Show Fixity 
Show FixityDirection 
Show Lit 

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

Show Body 

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

Show Guard 

Methods

showsPrec :: Int -> Guard -> ShowS #

show :: Guard -> String #

showList :: [Guard] -> ShowS #

Show Stmt 

Methods

showsPrec :: Int -> Stmt -> ShowS #

show :: Stmt -> String #

showList :: [Stmt] -> ShowS #

Show Range 

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Show TypeFamilyHead 
Show TySynEqn 
Show FamFlavour 
Show Foreign 
Show Callconv 
Show Safety 
Show Pragma 
Show Inline 
Show RuleMatch 
Show Phases 
Show RuleBndr 
Show AnnTarget 
Show SourceUnpackedness 
Show SourceStrictness 
Show DecidedStrictness 
Show Con 

Methods

showsPrec :: Int -> Con -> ShowS #

show :: Con -> String #

showList :: [Con] -> ShowS #

Show Bang 

Methods

showsPrec :: Int -> Bang -> ShowS #

show :: Bang -> String #

showList :: [Bang] -> ShowS #

Show FamilyResultSig 
Show TyLit 

Methods

showsPrec :: Int -> TyLit -> ShowS #

show :: TyLit -> String #

showList :: [TyLit] -> ShowS #

Show Role 

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

Show AnnLookup 
Show Padding 

Methods

showsPrec :: Int -> Padding -> ShowS #

show :: Padding -> String #

showList :: [Padding] -> ShowS #

Show DateFormatSpec 

Methods

showsPrec :: Int -> DateFormatSpec -> ShowS #

show :: DateFormatSpec -> String #

showList :: [DateFormatSpec] -> ShowS #

Show LocalTime 
Show ZonedTime 
Show TimeLocale 
Show a => Show [a] 

Methods

showsPrec :: Int -> [a] -> ShowS #

show :: [a] -> String #

showList :: [[a]] -> ShowS #

Show a => Show (Maybe a) 

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Show a => Show (Ratio a) 

Methods

showsPrec :: Int -> Ratio a -> ShowS #

show :: Ratio a -> String #

showList :: [Ratio a] -> ShowS #

Show (Ptr a) 

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

Show (FunPtr a) 

Methods

showsPrec :: Int -> FunPtr a -> ShowS #

show :: FunPtr a -> String #

showList :: [FunPtr a] -> ShowS #

Show (V1 p) 

Methods

showsPrec :: Int -> V1 p -> ShowS #

show :: V1 p -> String #

showList :: [V1 p] -> ShowS #

Show (U1 p) 

Methods

showsPrec :: Int -> U1 p -> ShowS #

show :: U1 p -> String #

showList :: [U1 p] -> ShowS #

Show p => Show (Par1 p) 

Methods

showsPrec :: Int -> Par1 p -> ShowS #

show :: Par1 p -> String #

showList :: [Par1 p] -> ShowS #

Show (ForeignPtr a) 
Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

Show a => Show (Min a) 

Methods

showsPrec :: Int -> Min a -> ShowS #

show :: Min a -> String #

showList :: [Min a] -> ShowS #

Show a => Show (Max a) 

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

Show a => Show (First a) 

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a) 

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show m => Show (WrappedMonoid m) 
Show a => Show (Option a) 

Methods

showsPrec :: Int -> Option a -> ShowS #

show :: Option a -> String #

showList :: [Option a] -> ShowS #

Show a => Show (NonEmpty a) 

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

HasResolution a => Show (Fixed a) 

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

Show a => Show (Complex a) 

Methods

showsPrec :: Int -> Complex a -> ShowS #

show :: Complex a -> String #

showList :: [Complex a] -> ShowS #

Show a => Show (ZipList a) 

Methods

showsPrec :: Int -> ZipList a -> ShowS #

show :: ZipList a -> String #

showList :: [ZipList a] -> ShowS #

Show a => Show (Dual a) 

Methods

showsPrec :: Int -> Dual a -> ShowS #

show :: Dual a -> String #

showList :: [Dual a] -> ShowS #

Show a => Show (Sum a) 

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

Show a => Show (Product a) 

Methods

showsPrec :: Int -> Product a -> ShowS #

show :: Product a -> String #

showList :: [Product a] -> ShowS #

Show a => Show (First a) 

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a) 

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show a => Show (Down a) 

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

Show a => Show (Vector a) 

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

Show a => Show (HashSet a) 

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

Show a => Show (Set a) 

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Show a => Show (Seq a) 

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

Show a => Show (IntMap a) 

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

Show a => Show (Tree a) 

Methods

showsPrec :: Int -> Tree a -> ShowS #

show :: Tree a -> String #

showList :: [Tree a] -> ShowS #

Show a => Show (ViewL a) 

Methods

showsPrec :: Int -> ViewL a -> ShowS #

show :: ViewL a -> String #

showList :: [ViewL a] -> ShowS #

Show a => Show (ViewR a) 

Methods

showsPrec :: Int -> ViewR a -> ShowS #

show :: ViewR a -> String #

showList :: [ViewR a] -> ShowS #

Show a => Show (DList a) 

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

Show a => Show (Hashed a) 

Methods

showsPrec :: Int -> Hashed a -> ShowS #

show :: Hashed a -> String #

showList :: [Hashed a] -> ShowS #

Show mono => Show (NonNull mono) 

Methods

showsPrec :: Int -> NonNull mono -> ShowS #

show :: NonNull mono -> String #

showList :: [NonNull mono] -> ShowS #

Show a => Show (Array a) 

Methods

showsPrec :: Int -> Array a -> ShowS #

show :: Array a -> String #

showList :: [Array a] -> ShowS #

(Show a, Storable a) => Show (Vector a) 

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

(Show a, Prim a) => Show (Vector a) 

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

(Show b, Show a) => Show (Either a b) 

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

Show (f p) => Show (Rec1 f p) 

Methods

showsPrec :: Int -> Rec1 f p -> ShowS #

show :: Rec1 f p -> String #

showList :: [Rec1 f p] -> ShowS #

Show (URec Char p) 

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Show (URec Double p) 

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Show (URec Float p) 

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Show (URec Int p) 

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Show (URec Word p) 

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

(Show a, Show b) => Show (a, b) 

Methods

showsPrec :: Int -> (a, b) -> ShowS #

show :: (a, b) -> String #

showList :: [(a, b)] -> ShowS #

Show (ST s a) 

Methods

showsPrec :: Int -> ST s a -> ShowS #

show :: ST s a -> String #

showList :: [ST s a] -> ShowS #

(Ix a, Show a, Show b) => Show (Array a b) 

Methods

showsPrec :: Int -> Array a b -> ShowS #

show :: Array a b -> String #

showList :: [Array a b] -> ShowS #

(Show b, Show a) => Show (Arg a b) 

Methods

showsPrec :: Int -> Arg a b -> ShowS #

show :: Arg a b -> String #

showList :: [Arg a b] -> ShowS #

Show (Proxy k s) 

Methods

showsPrec :: Int -> Proxy k s -> ShowS #

show :: Proxy k s -> String #

showList :: [Proxy k s] -> ShowS #

(Show k, Show v) => Show (HashMap k v) 

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(Show k, Show a) => Show (Map k a) 

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

(Show (f (Cofree f a)), Show a) => Show (Cofree f a) 

Methods

showsPrec :: Int -> Cofree f a -> ShowS #

show :: Cofree f a -> String #

showList :: [Cofree f a] -> ShowS #

(Show (f (Free f a)), Show a) => Show (Free f a) 

Methods

showsPrec :: Int -> Free f a -> ShowS #

show :: Free f a -> String #

showList :: [Free f a] -> ShowS #

(Show1 m, Show a) => Show (ListT m a) 

Methods

showsPrec :: Int -> ListT m a -> ShowS #

show :: ListT m a -> String #

showList :: [ListT m a] -> ShowS #

(Show1 m, Show a) => Show (MaybeT m a) 

Methods

showsPrec :: Int -> MaybeT m a -> ShowS #

show :: MaybeT m a -> String #

showList :: [MaybeT m a] -> ShowS #

Show c => Show (K1 i c p) 

Methods

showsPrec :: Int -> K1 i c p -> ShowS #

show :: K1 i c p -> String #

showList :: [K1 i c p] -> ShowS #

(Show (g p), Show (f p)) => Show ((:+:) f g p) 

Methods

showsPrec :: Int -> (f :+: g) p -> ShowS #

show :: (f :+: g) p -> String #

showList :: [(f :+: g) p] -> ShowS #

(Show (g p), Show (f p)) => Show ((:*:) f g p) 

Methods

showsPrec :: Int -> (f :*: g) p -> ShowS #

show :: (f :*: g) p -> String #

showList :: [(f :*: g) p] -> ShowS #

Show (f (g p)) => Show ((:.:) f g p) 

Methods

showsPrec :: Int -> (f :.: g) p -> ShowS #

show :: (f :.: g) p -> String #

showList :: [(f :.: g) p] -> ShowS #

(Show a, Show b, Show c) => Show (a, b, c) 

Methods

showsPrec :: Int -> (a, b, c) -> ShowS #

show :: (a, b, c) -> String #

showList :: [(a, b, c)] -> ShowS #

Show a => Show (Const k a b)

This instance would be equivalent to the derived instances of the Const newtype if the runConst field were removed

Methods

showsPrec :: Int -> Const k a b -> ShowS #

show :: Const k a b -> String #

showList :: [Const k a b] -> ShowS #

Show (f a) => Show (Alt k f a) 

Methods

showsPrec :: Int -> Alt k f a -> ShowS #

show :: Alt k f a -> String #

showList :: [Alt k f a] -> ShowS #

Show ((:~:) k a b) 

Methods

showsPrec :: Int -> (k :~: a) b -> ShowS #

show :: (k :~: a) b -> String #

showList :: [(k :~: a) b] -> ShowS #

Show (p a a) => Show (Join k p a) 

Methods

showsPrec :: Int -> Join k p a -> ShowS #

show :: Join k p a -> String #

showList :: [Join k p a] -> ShowS #

(Show1 f, Show a) => Show (IdentityT * f a) 

Methods

showsPrec :: Int -> IdentityT * f a -> ShowS #

show :: IdentityT * f a -> String #

showList :: [IdentityT * f a] -> ShowS #

(Show e, Show1 m, Show a) => Show (ErrorT e m a) 

Methods

showsPrec :: Int -> ErrorT e m a -> ShowS #

show :: ErrorT e m a -> String #

showList :: [ErrorT e m a] -> ShowS #

(Show e, Show1 m, Show a) => Show (ExceptT e m a) 

Methods

showsPrec :: Int -> ExceptT e m a -> ShowS #

show :: ExceptT e m a -> String #

showList :: [ExceptT e m a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

Show b => Show (Tagged k s b) 

Methods

showsPrec :: Int -> Tagged k s b -> ShowS #

show :: Tagged k s b -> String #

showList :: [Tagged k s b] -> ShowS #

Show (f p) => Show (M1 i c f p) 

Methods

showsPrec :: Int -> M1 i c f p -> ShowS #

show :: M1 i c f p -> String #

showList :: [M1 i c f p] -> ShowS #

(Show a, Show b, Show c, Show d) => Show (a, b, c, d) 

Methods

showsPrec :: Int -> (a, b, c, d) -> ShowS #

show :: (a, b, c, d) -> String #

showList :: [(a, b, c, d)] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Sum * f g a) 

Methods

showsPrec :: Int -> Sum * f g a -> ShowS #

show :: Sum * f g a -> String #

showList :: [Sum * f g a] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Product * f g a) 

Methods

showsPrec :: Int -> Product * f g a -> ShowS #

show :: Product * f g a -> String #

showList :: [Product * f g a] -> ShowS #

(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) 

Methods

showsPrec :: Int -> (a, b, c, d, e) -> ShowS #

show :: (a, b, c, d, e) -> String #

showList :: [(a, b, c, d, e)] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Compose * * f g a) 

Methods

showsPrec :: Int -> Compose * * f g a -> ShowS #

show :: Compose * * f g a -> String #

showList :: [Compose * * f g a] -> ShowS #

Show (p a b) => Show (WrappedBifunctor k1 k p a b) 

Methods

showsPrec :: Int -> WrappedBifunctor k1 k p a b -> ShowS #

show :: WrappedBifunctor k1 k p a b -> String #

showList :: [WrappedBifunctor k1 k p a b] -> ShowS #

Show (g b) => Show (Joker k1 k g a b) 

Methods

showsPrec :: Int -> Joker k1 k g a b -> ShowS #

show :: Joker k1 k g a b -> String #

showList :: [Joker k1 k g a b] -> ShowS #

Show (p b a) => Show (Flip k k1 p a b) 

Methods

showsPrec :: Int -> Flip k k1 p a b -> ShowS #

show :: Flip k k1 p a b -> String #

showList :: [Flip k k1 p a b] -> ShowS #

Show (f a) => Show (Clown k1 k f a b) 

Methods

showsPrec :: Int -> Clown k1 k f a b -> ShowS #

show :: Clown k1 k f a b -> String #

showList :: [Clown k1 k f a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS #

show :: (a, b, c, d, e, f) -> String #

showList :: [(a, b, c, d, e, f)] -> ShowS #

(Show (g a b), Show (f a b)) => Show (Product k1 k f g a b) 

Methods

showsPrec :: Int -> Product k1 k f g a b -> ShowS #

show :: Product k1 k f g a b -> String #

showList :: [Product k1 k f g a b] -> ShowS #

(Show (q a b), Show (p a b)) => Show (Sum k1 k p q a b) 

Methods

showsPrec :: Int -> Sum k1 k p q a b -> ShowS #

show :: Sum k1 k p q a b -> String #

showList :: [Sum k1 k p q a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS #

show :: (a, b, c, d, e, f, g) -> String #

showList :: [(a, b, c, d, e, f, g)] -> ShowS #

Show (f (p a b)) => Show (Tannen k2 k1 k f p a b) 

Methods

showsPrec :: Int -> Tannen k2 k1 k f p a b -> ShowS #

show :: Tannen k2 k1 k f p a b -> String #

showList :: [Tannen k2 k1 k f p a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS #

show :: (a, b, c, d, e, f, g, h) -> String #

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i) -> String #

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #

Show (p (f a) (g b)) => Show (Biff k3 k2 k1 k p f g a b) 

Methods

showsPrec :: Int -> Biff k3 k2 k1 k p f g a b -> ShowS #

show :: Biff k3 k2 k1 k p f g a b -> String #

showList :: [Biff k3 k2 k1 k p f g a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

tshow :: Show a => a -> Text Source #

tlshow :: Show a => a -> LText Source #

Case conversion

charToLower :: Char -> Char Source #

Convert a character to lower case.

Character-based case conversion is lossy in comparison to string-based toLower. For instance, İ will be converted to i, instead of i̇.

charToUpper :: Char -> Char Source #

Convert a character to upper case.

Character-based case conversion is lossy in comparison to string-based toUpper. For instance, ß won't be converted to SS.

IO

readFile :: MonadIO m => FilePath -> m ByteString Source #

Strictly read a file into a ByteString.

Since: 1.2.0

readFileUtf8 :: MonadIO m => FilePath -> m Text Source #

Strictly read a file into a Text using a UTF-8 character encoding. In the event of a character encoding error, a Unicode replacement character will be used (a.k.a., lenientDecode).

Since: 1.2.0

writeFile :: MonadIO m => FilePath -> ByteString -> m () Source #

Write a ByteString to a file.

Since: 1.2.0

writeFileUtf8 :: MonadIO m => FilePath -> Text -> m () Source #

Write a Text to a file using a UTF-8 character encoding.

Since: 1.2.0

hGetContents :: MonadIO m => Handle -> m ByteString Source #

Strictly read the contents of the given Handle into a ByteString.

Since: 1.2.0

hPut :: MonadIO m => Handle -> ByteString -> m () Source #

Write a ByteString to the given Handle.

Since: 1.2.0

hGetChunk :: MonadIO m => Handle -> m ByteString Source #

Read a single chunk of data as a ByteString from the given Handle.

Under the surface, this uses hGetSome with the default chunk size.

Since: 1.2.0

print :: (Show a, MonadIO m) => a -> m () Source #

hClose :: Handle -> IO () #

Computation hClose hdl makes handle hdl closed. Before the computation finishes, if hdl is writable its buffer is flushed as for hFlush. Performing hClose on a handle that has already been closed has no effect; doing so is not an error. All other operations on a closed handle will fail. If hClose fails for any reason, any further operations (apart from hClose) on the handle will still fail as if hdl had been successfully closed.

Difference lists

data DList a :: * -> * #

A difference list is a function that, given a list, returns the original contents of the difference list prepended to the given list.

This structure supports O(1) append and snoc operations on lists, making it very useful for append-heavy uses (esp. left-nested uses of ++), such as logging and pretty printing.

Here is an example using DList as the state type when printing a tree with the Writer monad:

import Control.Monad.Writer
import Data.DList

data Tree a = Leaf a | Branch (Tree a) (Tree a)

flatten_writer :: Tree x -> DList x
flatten_writer = snd . runWriter . flatten
    where
      flatten (Leaf x)     = tell (singleton x)
      flatten (Branch x y) = flatten x >> flatten y

Instances

Monad DList 

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

fail :: String -> DList a #

Functor DList 

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Applicative DList 

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

Foldable DList 

Methods

fold :: Monoid m => DList m -> m #

foldMap :: Monoid m => (a -> m) -> DList a -> m #

foldr :: (a -> b -> b) -> b -> DList a -> b #

foldr' :: (a -> b -> b) -> b -> DList a -> b #

foldl :: (b -> a -> b) -> b -> DList a -> b #

foldl' :: (b -> a -> b) -> b -> DList a -> b #

foldr1 :: (a -> a -> a) -> DList a -> a #

foldl1 :: (a -> a -> a) -> DList a -> a #

toList :: DList a -> [a] #

null :: DList a -> Bool #

length :: DList a -> Int #

elem :: Eq a => a -> DList a -> Bool #

maximum :: Ord a => DList a -> a #

minimum :: Ord a => DList a -> a #

sum :: Num a => DList a -> a #

product :: Num a => DList a -> a #

Alternative DList 

Methods

empty :: DList a #

(<|>) :: DList a -> DList a -> DList a #

some :: DList a -> DList [a] #

many :: DList a -> DList [a] #

MonadPlus DList 

Methods

mzero :: DList a #

mplus :: DList a -> DList a -> DList a #

IsList (DList a) 

Associated Types

type Item (DList a) :: * #

Methods

fromList :: [Item (DList a)] -> DList a #

fromListN :: Int -> [Item (DList a)] -> DList a #

toList :: DList a -> [Item (DList a)] #

Eq a => Eq (DList a) 

Methods

(==) :: DList a -> DList a -> Bool #

(/=) :: DList a -> DList a -> Bool #

Ord a => Ord (DList a) 

Methods

compare :: DList a -> DList a -> Ordering #

(<) :: DList a -> DList a -> Bool #

(<=) :: DList a -> DList a -> Bool #

(>) :: DList a -> DList a -> Bool #

(>=) :: DList a -> DList a -> Bool #

max :: DList a -> DList a -> DList a #

min :: DList a -> DList a -> DList a #

Read a => Read (DList a) 
Show a => Show (DList a) 

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

(~) * a Char => IsString (DList a) 

Methods

fromString :: String -> DList a #

Semigroup (DList a) 

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

Monoid (DList a) 

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

NFData a => NFData (DList a) 

Methods

rnf :: DList a -> () #

type Item (DList a) 
type Item (DList a) = a
type Index (DList a) 
type Index (DList a) = Int
type Element (DList a) 
type Element (DList a) = a

asDList :: DList a -> DList a Source #

Force type to a DList

Since 0.11.0

applyDList :: DList a -> [a] -> [a] Source #

Synonym for apply

Since 0.11.0

Exceptions

Force types

Helper functions for situations where type inferer gets confused.

asList :: [a] -> [a] Source #

asMap :: Map k v -> Map k v Source #

asSet :: Set a -> Set a Source #