goal-core-0.20: Common, non-geometric tools for use with Goal

Goal.Core

Contents

Description

This module re-exports a number of (compatible) modules from across base and other libraries, as well as most of the modules in goal-core. It does not re-export the Vector modules, which should be imported with qualification.

Synopsis

# Module Exports

($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 # Application operator. This operator is redundant, since ordinary application (f x) means the same as (f$ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example: f$ g $h x = f (g (h x)) It is also useful in higher-order situations, such as map ($ 0) xs, or zipWith ($) fs xs. Note that ($) is levity-polymorphic in its result type, so that foo $True where foo :: Bool -> Int# is well-typed. on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 # on b u x y runs the binary function b on the results of applying unary function u to two arguments x and y. From the opposite perspective, it transforms two inputs and combines the outputs. ((+) on f) x y = f x + f y Typical usage: sortBy (compare on fst). Algebraic properties: • (*) on id = (*) -- (if (*) ∉ {⊥, const ⊥}) • ((*) on f) on g = (*) on (f . g) • flip on f . flip on g = flip on (g . f) fix :: (a -> a) -> a # fix f is the least fixed point of the function f, i.e. the least defined x such that f x = x. For example, we can write the factorial function using direct recursion as >>> let fac n = if n <= 1 then 1 else n * fac (n-1) in fac 5 120  This uses the fact that Haskell’s let introduces recursive bindings. We can rewrite this definition using fix, >>> fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5 120  Instead of making a recursive call, we introduce a dummy parameter rec; when used within fix, this parameter then refers to fix’s argument, hence the recursion is reintroduced. flip :: (a -> b -> c) -> b -> a -> c # flip f takes its (first) two arguments in the reverse order of f. >>> flip (++) "hello" "world" "worldhello"  (.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 # Function composition. const :: a -> b -> a # const x is a unary function which evaluates to x for all inputs. >>> const 42 "hello" 42  >>> map (const 42) [0..3] [42,42,42,42]  id :: a -> a # Identity function. id x = x module Data.Ord module Data.Maybe (.!) :: FromField a => Record -> Int -> Parser a # (.:) :: FromField a => NamedRecord -> ByteString -> Parser a # genericParseRecord :: (Generic a, GFromRecord (Rep a)) => Options -> Record -> Parser a # genericToRecord :: (Generic a, GToRecord (Rep a) Field) => Options -> a -> Record # index :: FromField a => Record -> Int -> Parser a # lookup :: FromField a => NamedRecord -> ByteString -> Parser a # runParser :: Parser a -> Either String a # unsafeIndex :: FromField a => Record -> Int -> Parser a # decodeWithP :: (Record -> Parser a) -> DecodeOptions -> HasHeader -> ByteString -> Either String (Vector a) # encode :: ToRecord a => [a] -> ByteString # newtype Only a # Constructors  Only FieldsfromOnly :: a #### Instances Instances details  Instance detailsDefined in Data.Tuple.Only Methodsfmap :: (a -> b) -> Only a -> Only b #(<$) :: a -> Only b -> Only a # Eq a => Eq (Only a) Instance detailsDefined in Data.Tuple.Only Methods(==) :: Only a -> Only a -> Bool #(/=) :: Only a -> Only a -> Bool # Data a => Data (Only a) Instance detailsDefined in Data.Tuple.Only Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Only a -> c (Only a) #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Only a) #toConstr :: Only a -> Constr #dataTypeOf :: Only a -> DataType #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Only a)) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Only a)) #gmapT :: (forall b. Data b => b -> b) -> Only a -> Only a #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Only a -> r #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Only a -> r #gmapQ :: (forall d. Data d => d -> u) -> Only a -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Only a -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Only a -> m (Only a) #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Only a -> m (Only a) #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Only a -> m (Only a) # Ord a => Ord (Only a) Instance detailsDefined in Data.Tuple.Only Methodscompare :: Only a -> Only a -> Ordering #(<) :: Only a -> Only a -> Bool #(<=) :: Only a -> Only a -> Bool #(>) :: Only a -> Only a -> Bool #(>=) :: Only a -> Only a -> Bool #max :: Only a -> Only a -> Only a #min :: Only a -> Only a -> Only a # Read a => Read (Only a) Instance detailsDefined in Data.Tuple.Only MethodsreadsPrec :: Int -> ReadS (Only a) #readList :: ReadS [Only a] # Show a => Show (Only a) Instance detailsDefined in Data.Tuple.Only MethodsshowsPrec :: Int -> Only a -> ShowS #show :: Only a -> String #showList :: [Only a] -> ShowS # Generic (Only a) Instance detailsDefined in Data.Tuple.Only Associated Typestype Rep (Only a) :: Type -> Type # Methodsfrom :: Only a -> Rep (Only a) x #to :: Rep (Only a) x -> Only a # NFData a => NFData (Only a) Instance detailsDefined in Data.Tuple.Only Methodsrnf :: Only a -> () # FromField a => FromRecord (Only a) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (Only a) # ToField a => ToRecord (Only a) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: Only a -> Record # type Rep (Only a) Instance detailsDefined in Data.Tuple.Only type Rep (Only a) = D1 ('MetaData "Only" "Data.Tuple.Only" "Only-0.1-ab2d15d5e7f147a8aa0e0a50859350deb69248675c6e6af36eb02021188458d3" 'True) (C1 ('MetaCons "Only" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromOnly") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

class DefaultOrdered a where #

Minimal complete definition

Nothing

Methods

class FromField a where #

Methods

parseField :: Field -> Parser a #

#### Instances

Instances details
 Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Char # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Double # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Float # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Int # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Int8 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Int16 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Int32 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Int64 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Integer # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Natural # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Word # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Word8 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Word16 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Word32 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Word64 # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser () # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser ShortByteString # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser ByteString # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser ByteString # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Text # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Text # FromField Scientific Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser Scientific # FromField ShortText Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser ShortText # Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser [Char] # FromField a => FromField (Maybe a) Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser (Maybe a) # FromField a => FromField (Identity a) Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser (Identity a) # FromField a => FromField (Either Field a) Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser (Either Field a) # FromField a => FromField (Const a b) Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser (Const a b) #

class FromNamedRecord a where #

Minimal complete definition

Nothing

Methods

parseNamedRecord :: NamedRecord -> Parser a #

#### Instances

Instances details
 (FromField a, FromField b, Ord a) => FromNamedRecord (Map a b) Instance detailsDefined in Data.Csv.Conversion MethodsparseNamedRecord :: NamedRecord -> Parser (Map a b) # (Eq a, FromField a, FromField b, Hashable a) => FromNamedRecord (HashMap a b) Instance detailsDefined in Data.Csv.Conversion MethodsparseNamedRecord :: NamedRecord -> Parser (HashMap a b) #

class FromRecord a where #

Minimal complete definition

Nothing

Methods

parseRecord :: Record -> Parser a #

#### Instances

Instances details
 FromField a => FromRecord [a] Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser [a] # FromField a => FromRecord (Only a) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (Only a) # FromField a => FromRecord (Vector a) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (Vector a) # (FromField a, Unbox a) => FromRecord (Vector a) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (Vector a) # (FromField a, FromField b) => FromRecord (a, b) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b) # (FromField a, FromField b, FromField c) => FromRecord (a, b, c) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c) # (FromField a, FromField b, FromField c, FromField d) => FromRecord (a, b, c, d) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d) # (FromField a, FromField b, FromField c, FromField d, FromField e) => FromRecord (a, b, c, d, e) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f) => FromRecord (a, b, c, d, e, f) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g) => FromRecord (a, b, c, d, e, f, g) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h) => FromRecord (a, b, c, d, e, f, g, h) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i) => FromRecord (a, b, c, d, e, f, g, h, i) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i, FromField j) => FromRecord (a, b, c, d, e, f, g, h, i, j) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i, j) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i, FromField j, FromField k) => FromRecord (a, b, c, d, e, f, g, h, i, j, k) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i, j, k) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i, FromField j, FromField k, FromField l) => FromRecord (a, b, c, d, e, f, g, h, i, j, k, l) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i, j, k, l) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i, FromField j, FromField k, FromField l, FromField m) => FromRecord (a, b, c, d, e, f, g, h, i, j, k, l, m) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i, FromField j, FromField k, FromField l, FromField m, FromField n) => FromRecord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # (FromField a, FromField b, FromField c, FromField d, FromField e, FromField f, FromField g, FromField h, FromField i, FromField j, FromField k, FromField l, FromField m, FromField n, FromField o) => FromRecord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Instance detailsDefined in Data.Csv.Conversion MethodsparseRecord :: Record -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class GFromNamedRecord (f :: k -> Type) #

Minimal complete definition

gparseNamedRecord

#### Instances

Instances details
 GFromRecordSum f NamedRecord => GFromNamedRecord (M1 i n f :: k -> Type) Instance detailsDefined in Data.Csv.Conversion MethodsgparseNamedRecord :: forall (p :: k0). Options -> NamedRecord -> Parser (M1 i n f p)

class GFromRecord (f :: k -> Type) #

Minimal complete definition

gparseRecord

#### Instances

Instances details
 GFromRecordSum f Record => GFromRecord (M1 i n f :: k -> Type) Instance detailsDefined in Data.Csv.Conversion MethodsgparseRecord :: forall (p :: k0). Options -> Record -> Parser (M1 i n f p)

class GToNamedRecordHeader (a :: k -> Type) #

Minimal complete definition

#### Instances

Instances details

class GToRecord (a :: k -> Type) f #

Minimal complete definition

gtoRecord

#### Instances

Instances details
 GToRecord (U1 :: k -> Type) f Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> U1 p -> [f] ToField a => GToRecord (K1 i a :: k -> Type) Field Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> K1 i a p -> [Field] (GToRecord a f, GToRecord b f) => GToRecord (a :+: b :: k -> Type) f Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> (a :+: b) p -> [f] (GToRecord a f, GToRecord b f) => GToRecord (a :*: b :: k -> Type) f Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> (a :*: b) p -> [f] GToRecord a f => GToRecord (M1 D c a :: k -> Type) f Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> M1 D c a p -> [f] GToRecord a f => GToRecord (M1 C c a :: k -> Type) f Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> M1 C c a p -> [f] GToRecord a Field => GToRecord (M1 S c a :: k -> Type) Field Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> M1 S c a p -> [Field] (ToField a, Selector s) => GToRecord (M1 S s (K1 i a :: k -> Type) :: k -> Type) (ByteString, ByteString) Instance detailsDefined in Data.Csv.Conversion MethodsgtoRecord :: forall (p :: k0). Options -> M1 S s (K1 i a) p -> [(ByteString, ByteString)]

data Options #

#### Instances

Instances details
 Instance detailsDefined in Data.Csv.Conversion MethodsshowList :: [Options] -> ShowS #

class ToField a where #

Methods

toField :: a -> Field #

#### Instances

Instances details
 Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Char -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Double -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Float -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Int -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Int8 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Int16 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Int32 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Int64 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Integer -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Natural -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Word -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Word8 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Word16 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Word32 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Word64 -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: ShortByteString -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: ByteString -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: ByteString -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Text -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Text -> Field # ToField Scientific Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Scientific -> Field # ToField ShortText Instance detailsDefined in Data.Csv.Conversion MethodstoField :: ShortText -> Field # Instance detailsDefined in Data.Csv.Conversion MethodstoField :: [Char] -> Field # ToField a => ToField (Maybe a) Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Maybe a -> Field # ToField a => ToField (Identity a) Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Identity a -> Field # ToField a => ToField (Const a b) Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Const a b -> Field #

class ToNamedRecord a where #

Minimal complete definition

Nothing

Methods

toNamedRecord :: a -> NamedRecord #

#### Instances

Instances details
 (ToField a, ToField b, Ord a) => ToNamedRecord (Map a b) Instance detailsDefined in Data.Csv.Conversion MethodstoNamedRecord :: Map a b -> NamedRecord # (Eq a, ToField a, ToField b, Hashable a) => ToNamedRecord (HashMap a b) Instance detailsDefined in Data.Csv.Conversion MethodstoNamedRecord :: HashMap a b -> NamedRecord #

class ToRecord a where #

Minimal complete definition

Nothing

Methods

toRecord :: a -> Record #

#### Instances

Instances details
 ToField a => ToRecord [a] Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: [a] -> Record # ToField a => ToRecord (Only a) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: Only a -> Record # ToField a => ToRecord (Vector a) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: Vector a -> Record # (ToField a, Unbox a) => ToRecord (Vector a) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: Vector a -> Record # (ToField a, ToField b) => ToRecord (a, b) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b) -> Record # (ToField a, ToField b, ToField c) => ToRecord (a, b, c) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c) -> Record # (ToField a, ToField b, ToField c, ToField d) => ToRecord (a, b, c, d) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e) => ToRecord (a, b, c, d, e) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f) => ToRecord (a, b, c, d, e, f) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g) => ToRecord (a, b, c, d, e, f, g) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h) => ToRecord (a, b, c, d, e, f, g, h) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i) => ToRecord (a, b, c, d, e, f, g, h, i) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i, ToField j) => ToRecord (a, b, c, d, e, f, g, h, i, j) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i, j) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i, ToField j, ToField k) => ToRecord (a, b, c, d, e, f, g, h, i, j, k) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i, j, k) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i, ToField j, ToField k, ToField l) => ToRecord (a, b, c, d, e, f, g, h, i, j, k, l) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i, ToField j, ToField k, ToField l, ToField m) => ToRecord (a, b, c, d, e, f, g, h, i, j, k, l, m) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i, ToField j, ToField k, ToField l, ToField m, ToField n) => ToRecord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Record # (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f, ToField g, ToField h, ToField i, ToField j, ToField k, ToField l, ToField m, ToField n, ToField o) => ToRecord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Instance detailsDefined in Data.Csv.Conversion MethodstoRecord :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Record #

data EncodeOptions #

Constructors

 EncodeOptions FieldsencDelimiter :: !Word8 encUseCrLf :: !Bool encIncludeHeader :: !Bool encQuoting :: !Quoting

#### Instances

Instances details
 Instance detailsDefined in Data.Csv.Encoding Methods Instance detailsDefined in Data.Csv.Encoding MethodsshowList :: [EncodeOptions] -> ShowS #

data Quoting #

Constructors

 QuoteNone QuoteMinimal QuoteAll

#### Instances

Instances details
 Instance detailsDefined in Data.Csv.Encoding Methods(==) :: Quoting -> Quoting -> Bool #(/=) :: Quoting -> Quoting -> Bool # Instance detailsDefined in Data.Csv.Encoding MethodsshowList :: [Quoting] -> ShowS #

data DecodeOptions #

Constructors

 DecodeOptions FieldsdecDelimiter :: !Word8

#### Instances

Instances details
 Instance detailsDefined in Data.Csv.Parser Methods Instance detailsDefined in Data.Csv.Parser MethodsshowList :: [DecodeOptions] -> ShowS #

type Csv = Vector Record #

Constructors

type Header = Vector Name #

type Record = Vector Field #

module Data.Proxy

type Type = Type #

The kind of types with lifted values. For example Int :: Type.

(<$) :: Functor f => a -> f b -> f a infixl 4 # Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version. Using ApplicativeDo: 'a <$ bs' can be understood as the do expression

do bs
pure a


with an inferred Functor constraint.

class Functor f => Applicative (f :: Type -> Type) where #

A functor with application, providing operations to

• embed pure expressions (pure), and
• sequence computations and combine their results (<*> and liftA2).

A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y Further, any definition must satisfy the following: Identity pure id <*> v = v Composition pure (.) <*> u <*> v <*> w = u <*> (v <*> w) Homomorphism pure f <*> pure x = pure (f x) Interchange u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

• u *> v = (id <$ u) <*> v • u <* v = liftA2 const u v As a consequence of these laws, the Functor instance for f will satisfy • fmap f x = pure f <*> x It may be useful to note that supposing forall x y. p (q x y) = f x . g y it follows from the above that liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v If f is also a Monad, it should satisfy • pure = return • m1 <*> m2 = m1 >>= (x1 -> m2 >>= (x2 -> return (x1 x2))) • (*>) = (>>) (which implies that pure and <*> satisfy the applicative functor laws). Minimal complete definition pure, ((<*>) | liftA2) Methods pure :: a -> f a # Lift a value. (<*>) :: f (a -> b) -> f a -> f b infixl 4 # Sequential application. A few functors support an implementation of <*> that is more efficient than the default one. Using ApplicativeDo: 'fs <*> as' can be understood as the do expression do f <- fs a <- as pure (f a)  liftA2 :: (a -> b -> c) -> f a -> f b -> f c # Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap. Using ApplicativeDo: 'liftA2 f as bs' can be understood as the do expression do a <- as b <- bs pure (f a b)  (*>) :: f a -> f b -> f b infixl 4 # Sequence actions, discarding the value of the first argument. 'as *> bs' can be understood as the do expression do as bs  This is a tad complicated for our ApplicativeDo extension which will give it a Monad constraint. For an Applicative constraint we write it of the form do _ <- as b <- bs pure b  (<*) :: f a -> f b -> f a infixl 4 # Sequence actions, discarding the value of the second argument. Using ApplicativeDo: 'as <* bs' can be understood as the do expression do a <- as bs pure a  #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> [a] #(<*>) :: [a -> b] -> [a] -> [b] #liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #(*>) :: [a] -> [b] -> [b] #(<*) :: [a] -> [b] -> [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> Maybe a #(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #(*>) :: Maybe a -> Maybe b -> Maybe b #(<*) :: Maybe a -> Maybe b -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> IO a #(<*>) :: IO (a -> b) -> IO a -> IO b #liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #(*>) :: IO a -> IO b -> IO b #(<*) :: IO a -> IO b -> IO a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> Par1 a #(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b #liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #(*>) :: Par1 a -> Par1 b -> Par1 b #(<*) :: Par1 a -> Par1 b -> Par1 a # Instance detailsDefined in Language.Haskell.TH.Syntax Methodspure :: a -> Q a #(<*>) :: Q (a -> b) -> Q a -> Q b #liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c #(*>) :: Q a -> Q b -> Q b #(<*) :: Q a -> Q b -> Q a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodspure :: a -> Complex a #(<*>) :: Complex (a -> b) -> Complex a -> Complex b #liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #(*>) :: Complex a -> Complex b -> Complex b #(<*) :: Complex a -> Complex b -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Min a #(<*>) :: Min (a -> b) -> Min a -> Min b #liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #(*>) :: Min a -> Min b -> Min b #(<*) :: Min a -> Min b -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Max a #(<*>) :: Max (a -> b) -> Max a -> Max b #liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #(*>) :: Max a -> Max b -> Max b #(<*) :: Max a -> Max b -> Max a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> First a #(<*>) :: First (a -> b) -> First a -> First b #liftA2 :: (a -> b -> c) -> First a -> First b -> First c #(*>) :: First a -> First b -> First b #(<*) :: First a -> First b -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Last a #(<*>) :: Last (a -> b) -> Last a -> Last b #liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #(*>) :: Last a -> Last b -> Last b #(<*) :: Last a -> Last b -> Last a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Option a #(<*>) :: Option (a -> b) -> Option a -> Option b #liftA2 :: (a -> b -> c) -> Option a -> Option b -> Option c #(*>) :: Option a -> Option b -> Option b #(<*) :: Option a -> Option b -> Option a # f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> ZipList a #(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #(*>) :: ZipList a -> ZipList b -> ZipList b #(<*) :: ZipList a -> ZipList b -> ZipList a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodspure :: a -> Identity a #(<*>) :: Identity (a -> b) -> Identity a -> Identity b #liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #(*>) :: Identity a -> Identity b -> Identity b #(<*) :: Identity a -> Identity b -> Identity a # Since: base-4.8.0.0 Instance detailsDefined in GHC.Conc.Sync Methodspure :: a -> STM a #(<*>) :: STM (a -> b) -> STM a -> STM b #liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #(*>) :: STM a -> STM b -> STM b #(<*) :: STM a -> STM b -> STM a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodspure :: a -> First a #(<*>) :: First (a -> b) -> First a -> First b #liftA2 :: (a -> b -> c) -> First a -> First b -> First c #(*>) :: First a -> First b -> First b #(<*) :: First a -> First b -> First a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodspure :: a -> Last a #(<*>) :: Last (a -> b) -> Last a -> Last b #liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #(*>) :: Last a -> Last b -> Last b #(<*) :: Last a -> Last b -> Last a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Dual a #(<*>) :: Dual (a -> b) -> Dual a -> Dual b #liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #(*>) :: Dual a -> Dual b -> Dual b #(<*) :: Dual a -> Dual b -> Dual a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Sum a #(<*>) :: Sum (a -> b) -> Sum a -> Sum b #liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #(*>) :: Sum a -> Sum b -> Sum b #(<*) :: Sum a -> Sum b -> Sum a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Product a #(<*>) :: Product (a -> b) -> Product a -> Product b #liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #(*>) :: Product a -> Product b -> Product b #(<*) :: Product a -> Product b -> Product a # Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methodspure :: a -> Down a #(<*>) :: Down (a -> b) -> Down a -> Down b #liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #(*>) :: Down a -> Down b -> Down b #(<*) :: Down a -> Down b -> Down a # Since: base-4.6.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodspure :: a -> ReadP a #(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #(*>) :: ReadP a -> ReadP b -> ReadP b #(<*) :: ReadP a -> ReadP b -> ReadP a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodspure :: a -> NonEmpty a #(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a # Instance detailsDefined in Data.Tree Methodspure :: a -> Tree a #(<*>) :: Tree (a -> b) -> Tree a -> Tree b #liftA2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c #(*>) :: Tree a -> Tree b -> Tree b #(<*) :: Tree a -> Tree b -> Tree a # Since: containers-0.5.4 Instance detailsDefined in Data.Sequence.Internal Methodspure :: a -> Seq a #(<*>) :: Seq (a -> b) -> Seq a -> Seq b #liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #(*>) :: Seq a -> Seq b -> Seq b #(<*) :: Seq a -> Seq b -> Seq a # Since: base-4.5.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodspure :: a -> P a #(<*>) :: P (a -> b) -> P a -> P b #liftA2 :: (a -> b -> c) -> P a -> P b -> P c #(*>) :: P a -> P b -> P b #(<*) :: P a -> P b -> P a # Applicative Parser Instance detailsDefined in Data.Csv.Conversion Methodspure :: a -> Parser a #(<*>) :: Parser (a -> b) -> Parser a -> Parser b #liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c #(*>) :: Parser a -> Parser b -> Parser b #(<*) :: Parser a -> Parser b -> Parser a # Applicative Vector Instance detailsDefined in Data.Vector Methodspure :: a -> Vector a #(<*>) :: Vector (a -> b) -> Vector a -> Vector b #liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #(*>) :: Vector a -> Vector b -> Vector b #(<*) :: Vector a -> Vector b -> Vector a # Instance detailsDefined in Data.Vector.Fusion.Util Methodspure :: a -> Id a #(<*>) :: Id (a -> b) -> Id a -> Id b #liftA2 :: (a -> b -> c) -> Id a -> Id b -> Id c #(*>) :: Id a -> Id b -> Id b #(<*) :: Id a -> Id b -> Id a # Applicative Array Instance detailsDefined in Data.Primitive.Array Methodspure :: a -> Array a #(<*>) :: Array (a -> b) -> Array a -> Array b #liftA2 :: (a -> b -> c) -> Array a -> Array b -> Array c #(*>) :: Array a -> Array b -> Array b #(<*) :: Array a -> Array b -> Array a # Applicative Box Instance detailsDefined in Data.Vector.Fusion.Util Methodspure :: a -> Box a #(<*>) :: Box (a -> b) -> Box a -> Box b #liftA2 :: (a -> b -> c) -> Box a -> Box b -> Box c #(*>) :: Box a -> Box b -> Box b #(<*) :: Box a -> Box b -> Box a # Applicative Parser Instance detailsDefined in Options.Applicative.Types Methodspure :: a -> Parser a #(<*>) :: Parser (a -> b) -> Parser a -> Parser b #liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c #(*>) :: Parser a -> Parser b -> Parser b #(<*) :: Parser a -> Parser b -> Parser a # Applicative ParserResult Instance detailsDefined in Options.Applicative.Types Methodspure :: a -> ParserResult a #(<*>) :: ParserResult (a -> b) -> ParserResult a -> ParserResult b #liftA2 :: (a -> b -> c) -> ParserResult a -> ParserResult b -> ParserResult c #(*>) :: ParserResult a -> ParserResult b -> ParserResult b #(<*) :: ParserResult a -> ParserResult b -> ParserResult a # Applicative ReadM Instance detailsDefined in Options.Applicative.Types Methodspure :: a -> ReadM a #(<*>) :: ReadM (a -> b) -> ReadM a -> ReadM b #liftA2 :: (a -> b -> c) -> ReadM a -> ReadM b -> ReadM c #(*>) :: ReadM a -> ReadM b -> ReadM b #(<*) :: ReadM a -> ReadM b -> ReadM a # Applicative SmallArray Instance detailsDefined in Data.Primitive.SmallArray Methodspure :: a -> SmallArray a #(<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b #liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c #(*>) :: SmallArray a -> SmallArray b -> SmallArray b #(<*) :: SmallArray a -> SmallArray b -> SmallArray a # Applicative Root Instance detailsDefined in Numeric.RootFinding Methodspure :: a -> Root a #(<*>) :: Root (a -> b) -> Root a -> Root b #liftA2 :: (a -> b -> c) -> Root a -> Root b -> Root c #(*>) :: Root a -> Root b -> Root b #(<*) :: Root a -> Root b -> Root a # Applicative ParserM Instance detailsDefined in Options.Applicative.Types Methodspure :: a -> ParserM a #(<*>) :: ParserM (a -> b) -> ParserM a -> ParserM b #liftA2 :: (a -> b -> c) -> ParserM a -> ParserM b -> ParserM c #(*>) :: ParserM a -> ParserM b -> ParserM b #(<*) :: ParserM a -> ParserM b -> ParserM a # Since: base-3.0 Instance detailsDefined in Data.Either Methodspure :: a -> Either e a #(<*>) :: Either e (a -> b) -> Either e a -> Either e b #liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #(*>) :: Either e a -> Either e b -> Either e b #(<*) :: Either e a -> Either e b -> Either e a # Applicative (U1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> U1 a #(<*>) :: U1 (a -> b) -> U1 a -> U1 b #liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #(*>) :: U1 a -> U1 b -> U1 b #(<*) :: U1 a -> U1 b -> U1 a # Monoid a => Applicative ((,) a) For tuples, the Monoid constraint on a determines how the first values merge. For example, Strings concatenate:("hello ", (+15)) <*> ("world!", 2002) ("hello world!",2017)Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a0 -> (a, a0) #(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #(*>) :: (a, a0) -> (a, b) -> (a, b) #(<*) :: (a, a0) -> (a, b) -> (a, a0) # Since: base-4.4.0.0 Instance detailsDefined in GHC.ST Methodspure :: a -> ST s a #(<*>) :: ST s (a -> b) -> ST s a -> ST s b #liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #(*>) :: ST s a -> ST s b -> ST s b #(<*) :: ST s a -> ST s b -> ST s a # Since: base-2.1 Instance detailsDefined in Control.Monad.ST.Lazy.Imp Methodspure :: a -> ST s a #(<*>) :: ST s (a -> b) -> ST s a -> ST s b #liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #(*>) :: ST s a -> ST s b -> ST s b #(<*) :: ST s a -> ST s b -> ST s a # Monad m => Applicative (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> WrappedMonad m a #(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # Arrow a => Applicative (ArrowMonad a) Since: base-4.6.0.0 Instance detailsDefined in Control.Arrow Methodspure :: a0 -> ArrowMonad a a0 #(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 # Applicative (Proxy :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methodspure :: a -> Proxy a #(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #(*>) :: Proxy a -> Proxy b -> Proxy b #(<*) :: Proxy a -> Proxy b -> Proxy a # (Functor m, Monad m) => Applicative (MaybeT m) Instance detailsDefined in Control.Monad.Trans.Maybe Methodspure :: a -> MaybeT m a #(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a # Applicative m => Applicative (ListT m) Instance detailsDefined in Control.Monad.Trans.List Methodspure :: a -> ListT m a #(<*>) :: ListT m (a -> b) -> ListT m a -> ListT m b #liftA2 :: (a -> b -> c) -> ListT m a -> ListT m b -> ListT m c #(*>) :: ListT m a -> ListT m b -> ListT m b #(<*) :: ListT m a -> ListT m b -> ListT m a # Applicative (Parser i) Instance detailsDefined in Data.Attoparsec.Internal.Types Methodspure :: a -> Parser i a #(<*>) :: Parser i (a -> b) -> Parser i a -> Parser i b #liftA2 :: (a -> b -> c) -> Parser i a -> Parser i b -> Parser i c #(*>) :: Parser i a -> Parser i b -> Parser i b #(<*) :: Parser i a -> Parser i b -> Parser i a # Representable f => Applicative (Co f) Instance detailsDefined in Data.Functor.Rep Methodspure :: a -> Co f a #(<*>) :: Co f (a -> b) -> Co f a -> Co f b #liftA2 :: (a -> b -> c) -> Co f a -> Co f b -> Co f c #(*>) :: Co f a -> Co f b -> Co f b #(<*) :: Co f a -> Co f b -> Co f a # Alternative f => Applicative (Cofree f) Instance detailsDefined in Control.Comonad.Cofree Methodspure :: a -> Cofree f a #(<*>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #liftA2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c #(*>) :: Cofree f a -> Cofree f b -> Cofree f b #(<*) :: Cofree f a -> Cofree f b -> Cofree f a # Applicative f => Applicative (Rec1 f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> Rec1 f a #(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a # (Monoid a, Monoid b) => Applicative ((,,) a b) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methodspure :: a0 -> (a, b, a0) #(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) #liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) #(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) # Arrow a => Applicative (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a0 -> WrappedArrow a b a0 #(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # Applicative m => Applicative (Kleisli m a) Since: base-4.14.0.0 Instance detailsDefined in Control.Arrow Methodspure :: a0 -> Kleisli m a a0 #(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 # Monoid m => Applicative (Const m :: Type -> Type) Since: base-2.0.1 Instance detailsDefined in Data.Functor.Const Methodspure :: a -> Const m a #(<*>) :: Const m (a -> b) -> Const m a -> Const m b #liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #(*>) :: Const m a -> Const m b -> Const m b #(<*) :: Const m a -> Const m b -> Const m a # Applicative f => Applicative (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methodspure :: a -> Ap f a #(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #(*>) :: Ap f a -> Ap f b -> Ap f b #(<*) :: Ap f a -> Ap f b -> Ap f a # Applicative f => Applicative (Alt f) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Alt f a #(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #(*>) :: Alt f a -> Alt f b -> Alt f b #(<*) :: Alt f a -> Alt f b -> Alt f a # (Applicative f, Monad f) => Applicative (WhenMissing f x) Equivalent to ReaderT k (ReaderT x (MaybeT f)).Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methodspure :: a -> WhenMissing f x a #(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a # (Functor m, Monad m) => Applicative (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methodspure :: a -> ExceptT e m a #(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a # Instance detailsDefined in Control.Monad.Trans.Identity Methodspure :: a -> IdentityT m a #(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b #liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c #(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a # (Functor m, Monad m) => Applicative (ErrorT e m) Instance detailsDefined in Control.Monad.Trans.Error Methodspure :: a -> ErrorT e m a #(<*>) :: ErrorT e m (a -> b) -> ErrorT e m a -> ErrorT e m b #liftA2 :: (a -> b -> c) -> ErrorT e m a -> ErrorT e m b -> ErrorT e m c #(*>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #(<*) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m a # Applicative m => Applicative (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader Methodspure :: a -> ReaderT r m a #(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a # (Functor m, Monad m) => Applicative (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methodspure :: a -> StateT s m a #(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #(*>) :: StateT s m a -> StateT s m b -> StateT s m b #(<*) :: StateT s m a -> StateT s m b -> StateT s m a # (Functor m, Monad m) => Applicative (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methodspure :: a -> StateT s m a #(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #(*>) :: StateT s m a -> StateT s m b -> StateT s m b #(<*) :: StateT s m a -> StateT s m b -> StateT s m a # (Monoid w, Applicative m) => Applicative (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methodspure :: a -> WriterT w m a #(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a # (Monoid w, Applicative m) => Applicative (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methodspure :: a -> WriterT w m a #(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a # (Monoid w, Functor m, Monad m) => Applicative (AccumT w m) Instance detailsDefined in Control.Monad.Trans.Accum Methodspure :: a -> AccumT w m a #(<*>) :: AccumT w m (a -> b) -> AccumT w m a -> AccumT w m b #liftA2 :: (a -> b -> c) -> AccumT w m a -> AccumT w m b -> AccumT w m c #(*>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #(<*) :: AccumT w m a -> AccumT w m b -> AccumT w m a # (Functor m, Monad m) => Applicative (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.CPS Methodspure :: a -> WriterT w m a #(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a # (Functor m, Monad m) => Applicative (SelectT r m) Instance detailsDefined in Control.Monad.Trans.Select Methodspure :: a -> SelectT r m a #(<*>) :: SelectT r m (a -> b) -> SelectT r m a -> SelectT r m b #liftA2 :: (a -> b -> c) -> SelectT r m a -> SelectT r m b -> SelectT r m c #(*>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #(<*) :: SelectT r m a -> SelectT r m b -> SelectT r m a # Applicative (Tagged s) Instance detailsDefined in Data.Tagged Methodspure :: a -> Tagged s a #(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b #liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c #(*>) :: Tagged s a -> Tagged s b -> Tagged s b #(<*) :: Tagged s a -> Tagged s b -> Tagged s a # Biapplicative p => Applicative (Join p) Instance detailsDefined in Data.Bifunctor.Join Methodspure :: a -> Join p a #(<*>) :: Join p (a -> b) -> Join p a -> Join p b #liftA2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c #(*>) :: Join p a -> Join p b -> Join p b #(<*) :: Join p a -> Join p b -> Join p a # Applicative ((->) r :: Type -> Type) Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> r -> a #(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b #liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c #(*>) :: (r -> a) -> (r -> b) -> r -> b #(<*) :: (r -> a) -> (r -> b) -> r -> a # Monoid c => Applicative (K1 i c :: Type -> Type) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> K1 i c a #(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b #liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #(*>) :: K1 i c a -> K1 i c b -> K1 i c b #(<*) :: K1 i c a -> K1 i c b -> K1 i c a # (Applicative f, Applicative g) => Applicative (f :*: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> (f :*: g) a #(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b #liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a # (Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methodspure :: a0 -> (a, b, c, a0) #(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) #(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) # (Applicative f, Applicative g) => Applicative (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methodspure :: a -> Product f g a #(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #(*>) :: Product f g a -> Product f g b -> Product f g b #(<*) :: Product f g a -> Product f g b -> Product f g a # (Monad f, Applicative f) => Applicative (WhenMatched f x y) Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methodspure :: a -> WhenMatched f x y a #(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a # (Applicative f, Monad f) => Applicative (WhenMissing f k x) Equivalent to  ReaderT k (ReaderT x (MaybeT f)) .Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methodspure :: a -> WhenMissing f k x a #(<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c #(*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #(<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a # Applicative (ContT r m) Instance detailsDefined in Control.Monad.Trans.Cont Methodspure :: a -> ContT r m a #(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #(*>) :: ContT r m a -> ContT r m b -> ContT r m b #(<*) :: ContT r m a -> ContT r m b -> ContT r m a # Applicative f => Applicative (M1 i c f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> M1 i c f a #(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b #liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 #(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a # (Applicative f, Applicative g) => Applicative (f :.: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> (f :.: g) a #(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b #liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b #(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a # (Applicative f, Applicative g) => Applicative (Compose f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Compose Methodspure :: a -> Compose f g a #(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #(*>) :: Compose f g a -> Compose f g b -> Compose f g b #(<*) :: Compose f g a -> Compose f g b -> Compose f g a # (Monad f, Applicative f) => Applicative (WhenMatched f k x y) Equivalent to  ReaderT k (ReaderT x (ReaderT y (MaybeT f))) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methodspure :: a -> WhenMatched f k x y a #(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c #(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a # (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methodspure :: a -> RWST r w s m a #(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a # (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methodspure :: a -> RWST r w s m a #(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a # (Functor m, Monad m) => Applicative (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.CPS Methodspure :: a -> RWST r w s m a #(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a # optional :: Alternative f => f a -> f (Maybe a) # One or none. newtype WrappedMonad (m :: Type -> Type) a # Constructors  WrapMonad FieldsunwrapMonad :: m a #### Instances Instances details  Monad m => Monad (WrappedMonad m) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #return :: a -> WrappedMonad m a # Monad m => Functor (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #(<$) :: a -> WrappedMonad m b -> WrappedMonad m a # Monad m => Applicative (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> WrappedMonad m a #(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsempty :: WrappedMonad m a #(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #some :: WrappedMonad m a -> WrappedMonad m [a] #many :: WrappedMonad m a -> WrappedMonad m [a] # Generic1 (WrappedMonad m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 (WrappedMonad m) :: k -> Type # Methodsfrom1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a #to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a # Generic (WrappedMonad m a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep (WrappedMonad m a) :: Type -> Type # Methodsfrom :: WrappedMonad m a -> Rep (WrappedMonad m a) x #to :: Rep (WrappedMonad m a) x -> WrappedMonad m a # type Rep1 (WrappedMonad m :: Type -> Type) Instance detailsDefined in Control.Applicative type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m))) type Rep (WrappedMonad m a) Instance detailsDefined in Control.Applicative type Rep (WrappedMonad m a) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m a))))

newtype WrappedArrow (a :: Type -> Type -> Type) b c #

Constructors

 WrapArrow FieldsunwrapArrow :: a b c

#### Instances

Instances details
 Generic1 (WrappedArrow a b :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 (WrappedArrow a b) :: k -> Type # Methodsfrom1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 #to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 # Arrow a => Functor (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # Arrow a => Applicative (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a0 -> WrappedArrow a b a0 #(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # (ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsempty :: WrappedArrow a b a0 #(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] # Generic (WrappedArrow a b c) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep (WrappedArrow a b c) :: Type -> Type # Methodsfrom :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c # type Rep1 (WrappedArrow a b :: Type -> Type) Instance detailsDefined in Control.Applicative type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b)))) type Rep (WrappedArrow a b c) Instance detailsDefined in Control.Applicative type Rep (WrappedArrow a b c) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a b c)))) newtype ZipList a # Lists, but with an Applicative functor based on zipping. Constructors  ZipList FieldsgetZipList :: [a] #### Instances Instances details  Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> ZipList a -> ZipList b #(<$) :: a -> ZipList b -> ZipList a # f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> ZipList a #(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #(*>) :: ZipList a -> ZipList b -> ZipList b #(<*) :: ZipList a -> ZipList b -> ZipList a # Since: base-4.9.0.0 Instance detailsDefined in Control.Applicative Methodsfold :: Monoid m => ZipList m -> m #foldMap :: Monoid m => (a -> m) -> ZipList a -> m #foldMap' :: Monoid m => (a -> m) -> ZipList a -> m #foldr :: (a -> b -> b) -> b -> ZipList a -> b #foldr' :: (a -> b -> b) -> b -> ZipList a -> b #foldl :: (b -> a -> b) -> b -> ZipList a -> b #foldl' :: (b -> a -> b) -> b -> ZipList a -> b #foldr1 :: (a -> a -> a) -> ZipList a -> a #foldl1 :: (a -> a -> a) -> ZipList a -> a #toList :: ZipList a -> [a] #null :: ZipList a -> Bool #length :: ZipList a -> Int #elem :: Eq a => a -> ZipList a -> Bool #maximum :: Ord a => ZipList a -> a #minimum :: Ord a => ZipList a -> a #sum :: Num a => ZipList a -> a #product :: Num a => ZipList a -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) #sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) #sequence :: Monad m => ZipList (m a) -> m (ZipList a) # Since: base-4.11.0.0 Instance detailsDefined in Control.Applicative Methods(<|>) :: ZipList a -> ZipList a -> ZipList a #some :: ZipList a -> ZipList [a] #many :: ZipList a -> ZipList [a] # Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a -> ()) -> ZipList a -> () # Since: base-4.15.0.0 Instance detailsDefined in GHC.Exts Associated Typestype Item (ZipList a) # MethodsfromList :: [Item (ZipList a)] -> ZipList a #fromListN :: Int -> [Item (ZipList a)] -> ZipList a #toList :: ZipList a -> [Item (ZipList a)] # Eq a => Eq (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods(==) :: ZipList a -> ZipList a -> Bool #(/=) :: ZipList a -> ZipList a -> Bool # Ord a => Ord (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methodscompare :: ZipList a -> ZipList a -> Ordering #(<) :: ZipList a -> ZipList a -> Bool #(<=) :: ZipList a -> ZipList a -> Bool #(>) :: ZipList a -> ZipList a -> Bool #(>=) :: ZipList a -> ZipList a -> Bool #max :: ZipList a -> ZipList a -> ZipList a #min :: ZipList a -> ZipList a -> ZipList a # Read a => Read (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative MethodsreadsPrec :: Int -> ReadS (ZipList a) # Show a => Show (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative MethodsshowsPrec :: Int -> ZipList a -> ShowS #show :: ZipList a -> String #showList :: [ZipList a] -> ShowS # Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep (ZipList a) :: Type -> Type # Methodsfrom :: ZipList a -> Rep (ZipList a) x #to :: Rep (ZipList a) x -> ZipList a # NFData a => NFData (ZipList a) Since: deepseq-1.4.0.0 Instance detailsDefined in Control.DeepSeq Methodsrnf :: ZipList a -> () # Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 ZipList :: k -> Type # Methodsfrom1 :: forall (a :: k). ZipList a -> Rep1 ZipList a #to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a # type Rep (ZipList a) Instance detailsDefined in Control.Applicative type Rep (ZipList a) = D1 ('MetaData "ZipList" "Control.Applicative" "base" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))) type Item (ZipList a) Instance detailsDefined in GHC.Exts type Item (ZipList a) = a type Rep1 ZipList Instance detailsDefined in Control.Applicative type Rep1 ZipList = D1 ('MetaData "ZipList" "Control.Applicative" "base" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))

newtype Const a (b :: k) #

The Const functor.

Constructors

 Const FieldsgetConst :: a

#### Instances

Instances details
 Generic1 (Const a :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep1 (Const a) :: k -> Type # Methodsfrom1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 #to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 # Unbox a => Vector Vector (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Const a b) -> m (Vector (Const a b))basicUnsafeThaw :: PrimMonad m => Vector (Const a b) -> m (Mutable Vector (PrimState m) (Const a b))basicLength :: Vector (Const a b) -> IntbasicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b)basicUnsafeIndexM :: Monad m => Vector (Const a b) -> Int -> m (Const a b)basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Const a b) -> Vector (Const a b) -> m ()elemseq :: Vector (Const a b) -> Const a b -> b0 -> b0 Unbox a => MVector MVector (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base MethodsbasicLength :: MVector s (Const a b) -> IntbasicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b)basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> BoolbasicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Const a b))basicInitialize :: PrimMonad m => MVector (PrimState m) (Const a b) -> m ()basicUnsafeReplicate :: PrimMonad m => Int -> Const a b -> m (MVector (PrimState m) (Const a b))basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> m (Const a b)basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> Const a b -> m ()basicClear :: PrimMonad m => MVector (PrimState m) (Const a b) -> m ()basicSet :: PrimMonad m => MVector (PrimState m) (Const a b) -> Const a b -> m ()basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Const a b) -> MVector (PrimState m) (Const a b) -> m ()basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Const a b) -> MVector (PrimState m) (Const a b) -> m ()basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> m (MVector (PrimState m) (Const a b)) Eq2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool # Ord2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering # Read2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) #liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] #liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) #liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] # Show2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS #liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS # NFData2 (Const :: Type -> Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () # Hashable2 (Const :: Type -> Type -> Type) Instance detailsDefined in Data.Hashable.Class MethodsliftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Const a b -> Int Functor (Const m :: Type -> Type) Since: base-2.1 Instance detailsDefined in Data.Functor.Const Methodsfmap :: (a -> b) -> Const m a -> Const m b #(<) :: a -> Const m b -> Const m a # Monoid m => Applicative (Const m :: Type -> Type) Since: base-2.0.1 Instance detailsDefined in Data.Functor.Const Methodspure :: a -> Const m a #(<*>) :: Const m (a -> b) -> Const m a -> Const m b #liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #(*>) :: Const m a -> Const m b -> Const m b #(<*) :: Const m a -> Const m b -> Const m a # Foldable (Const m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Functor.Const Methodsfold :: Monoid m0 => Const m m0 -> m0 #foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 #foldr :: (a -> b -> b) -> b -> Const m a -> b #foldr' :: (a -> b -> b) -> b -> Const m a -> b #foldl :: (b -> a -> b) -> b -> Const m a -> b #foldl' :: (b -> a -> b) -> b -> Const m a -> b #foldr1 :: (a -> a -> a) -> Const m a -> a #foldl1 :: (a -> a -> a) -> Const m a -> a #toList :: Const m a -> [a] #null :: Const m a -> Bool #length :: Const m a -> Int #elem :: Eq a => a -> Const m a -> Bool #maximum :: Ord a => Const m a -> a #minimum :: Ord a => Const m a -> a #sum :: Num a => Const m a -> a #product :: Num a => Const m a -> a # Traversable (Const m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) #sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) # Eq a => Eq1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool # Ord a => Ord1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering # Read a => Read1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) #liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] #liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) #liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] # Show a => Show1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS #liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS # NFData a => NFData1 (Const a :: Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a0 -> ()) -> Const a a0 -> () # Hashable a => Hashable1 (Const a :: Type -> Type) Instance detailsDefined in Data.Hashable.Class MethodsliftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Const a a0 -> Int Bounded a => Bounded (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsminBound :: Const a b #maxBound :: Const a b # Enum a => Enum (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodssucc :: Const a b -> Const a b #pred :: Const a b -> Const a b #toEnum :: Int -> Const a b #fromEnum :: Const a b -> Int #enumFrom :: Const a b -> [Const a b] #enumFromThen :: Const a b -> Const a b -> [Const a b] #enumFromTo :: Const a b -> Const a b -> [Const a b] #enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # Eq a => Eq (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(==) :: Const a b -> Const a b -> Bool #(/=) :: Const a b -> Const a b -> Bool # Floating a => Floating (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodspi :: Const a b #exp :: Const a b -> Const a b #log :: Const a b -> Const a b #sqrt :: Const a b -> Const a b #(**) :: Const a b -> Const a b -> Const a b #logBase :: Const a b -> Const a b -> Const a b #sin :: Const a b -> Const a b #cos :: Const a b -> Const a b #tan :: Const a b -> Const a b #asin :: Const a b -> Const a b #acos :: Const a b -> Const a b #atan :: Const a b -> Const a b #sinh :: Const a b -> Const a b #cosh :: Const a b -> Const a b #tanh :: Const a b -> Const a b #asinh :: Const a b -> Const a b #acosh :: Const a b -> Const a b #atanh :: Const a b -> Const a b #log1p :: Const a b -> Const a b #expm1 :: Const a b -> Const a b #log1pexp :: Const a b -> Const a b #log1mexp :: Const a b -> Const a b # Fractional a => Fractional (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(/) :: Const a b -> Const a b -> Const a b #recip :: Const a b -> Const a b #fromRational :: Rational -> Const a b # Integral a => Integral (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsquot :: Const a b -> Const a b -> Const a b #rem :: Const a b -> Const a b -> Const a b #div :: Const a b -> Const a b -> Const a b #mod :: Const a b -> Const a b -> Const a b #quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #divMod :: Const a b -> Const a b -> (Const a b, Const a b) #toInteger :: Const a b -> Integer # Num a => Num (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(+) :: Const a b -> Const a b -> Const a b #(-) :: Const a b -> Const a b -> Const a b #(*) :: Const a b -> Const a b -> Const a b #negate :: Const a b -> Const a b #abs :: Const a b -> Const a b #signum :: Const a b -> Const a b #fromInteger :: Integer -> Const a b # Ord a => Ord (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodscompare :: Const a b -> Const a b -> Ordering #(<) :: Const a b -> Const a b -> Bool #(<=) :: Const a b -> Const a b -> Bool #(>) :: Const a b -> Const a b -> Bool #(>=) :: Const a b -> Const a b -> Bool #max :: Const a b -> Const a b -> Const a b #min :: Const a b -> Const a b -> Const a b # Read a => Read (Const a b) This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Const MethodsreadsPrec :: Int -> ReadS (Const a b) #readList :: ReadS [Const a b] #readPrec :: ReadPrec (Const a b) #readListPrec :: ReadPrec [Const a b] # Real a => Real (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodstoRational :: Const a b -> Rational # RealFloat a => RealFloat (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsfloatRadix :: Const a b -> Integer #floatDigits :: Const a b -> Int #floatRange :: Const a b -> (Int, Int) #decodeFloat :: Const a b -> (Integer, Int) #encodeFloat :: Integer -> Int -> Const a b #exponent :: Const a b -> Int #significand :: Const a b -> Const a b #scaleFloat :: Int -> Const a b -> Const a b #isNaN :: Const a b -> Bool #isInfinite :: Const a b -> Bool #isDenormalized :: Const a b -> Bool #isNegativeZero :: Const a b -> Bool #isIEEE :: Const a b -> Bool #atan2 :: Const a b -> Const a b -> Const a b # RealFrac a => RealFrac (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsproperFraction :: Integral b0 => Const a b -> (b0, Const a b) #truncate :: Integral b0 => Const a b -> b0 #round :: Integral b0 => Const a b -> b0 #ceiling :: Integral b0 => Const a b -> b0 #floor :: Integral b0 => Const a b -> b0 # Show a => Show (Const a b) This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Const MethodsshowsPrec :: Int -> Const a b -> ShowS #show :: Const a b -> String #showList :: [Const a b] -> ShowS # Ix a => Ix (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsrange :: (Const a b, Const a b) -> [Const a b] #index :: (Const a b, Const a b) -> Const a b -> Int #unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int #inRange :: (Const a b, Const a b) -> Const a b -> Bool #rangeSize :: (Const a b, Const a b) -> Int #unsafeRangeSize :: (Const a b, Const a b) -> Int # IsString a => IsString (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.String MethodsfromString :: String -> Const a b # Generic (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep (Const a b) :: Type -> Type # Methodsfrom :: Const a b -> Rep (Const a b) x #to :: Rep (Const a b) x -> Const a b # Semigroup a => Semigroup (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(<>) :: Const a b -> Const a b -> Const a b #sconcat :: NonEmpty (Const a b) -> Const a b #stimes :: Integral b0 => b0 -> Const a b -> Const a b # Monoid a => Monoid (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsmempty :: Const a b #mappend :: Const a b -> Const a b -> Const a b #mconcat :: [Const a b] -> Const a b # Storable a => Storable (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodssizeOf :: Const a b -> Int #alignment :: Const a b -> Int #peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #peek :: Ptr (Const a b) -> IO (Const a b) #poke :: Ptr (Const a b) -> Const a b -> IO () # Bits a => Bits (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(.&.) :: Const a b -> Const a b -> Const a b #(.|.) :: Const a b -> Const a b -> Const a b #xor :: Const a b -> Const a b -> Const a b #complement :: Const a b -> Const a b #shift :: Const a b -> Int -> Const a b #rotate :: Const a b -> Int -> Const a b #zeroBits :: Const a b #bit :: Int -> Const a b #setBit :: Const a b -> Int -> Const a b #clearBit :: Const a b -> Int -> Const a b #complementBit :: Const a b -> Int -> Const a b #testBit :: Const a b -> Int -> Bool #bitSizeMaybe :: Const a b -> Maybe Int #bitSize :: Const a b -> Int #isSigned :: Const a b -> Bool #shiftL :: Const a b -> Int -> Const a b #unsafeShiftL :: Const a b -> Int -> Const a b #shiftR :: Const a b -> Int -> Const a b #unsafeShiftR :: Const a b -> Int -> Const a b #rotateL :: Const a b -> Int -> Const a b #rotateR :: Const a b -> Int -> Const a b #popCount :: Const a b -> Int # FiniteBits a => FiniteBits (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsfiniteBitSize :: Const a b -> Int #countLeadingZeros :: Const a b -> Int #countTrailingZeros :: Const a b -> Int # NFData a => NFData (Const a b) Since: deepseq-1.4.0.0 Instance detailsDefined in Control.DeepSeq Methodsrnf :: Const a b -> () # FromField a => FromField (Const a b) Instance detailsDefined in Data.Csv.Conversion MethodsparseField :: Field -> Parser (Const a b) # ToField a => ToField (Const a b) Instance detailsDefined in Data.Csv.Conversion MethodstoField :: Const a b -> Field # Unbox a => Unbox (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base Hashable a => Hashable (Const a b) Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Const a b -> Inthash :: Const a b -> Int Prim a => Prim (Const a b) Instance detailsDefined in Data.Primitive.Types MethodssizeOf# :: Const a b -> Int#alignment# :: Const a b -> Int#indexByteArray# :: ByteArray# -> Int# -> Const a breadByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Const a b #)writeByteArray# :: MutableByteArray# s -> Int# -> Const a b -> State# s -> State# ssetByteArray# :: MutableByteArray# s -> Int# -> Int# -> Const a b -> State# s -> State# sindexOffAddr# :: Addr# -> Int# -> Const a breadOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Const a b #)writeOffAddr# :: Addr# -> Int# -> Const a b -> State# s -> State# ssetOffAddr# :: Addr# -> Int# -> Int# -> Const a b -> State# s -> State# s type Rep1 (Const a :: k -> Type) Instance detailsDefined in Data.Functor.Const type Rep1 (Const a :: k -> Type) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) newtype MVector s (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base newtype MVector s (Const a b) = MV_Const (MVector s a) type Rep (Const a b) Instance detailsDefined in Data.Functor.Const type Rep (Const a b) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) newtype Vector (Const a b) Instance detailsDefined in Data.Vector.Unboxed.Base newtype Vector (Const a b) = V_Const (Vector a) (<>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

An infix synonym for fmap.

The name of this operator is an allusion to $. Note the similarities between their types:  ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b Whereas $ is function application, <$> is function application lifted over a Functor. #### Examples Expand Convert from a Maybe Int to a Maybe String using show: >>> show <$> Nothing
Nothing
>>> show <$> Just 3 Just "3"  Convert from an Either Int Int to an Either Int String using show: >>> show <$> Left 17
Left 17
>>> show <$> Right 17 Right "17"  Double each element of a list: >>> (*2) <$> [1,2,3]
[2,4,6]


Apply even to the second element of a pair:

>>> even <$> (2,2) (2,True)  liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d # Lift a ternary function to actions. Using ApplicativeDo: 'liftA3 f as bs cs' can be understood as the do expression do a <- as b <- bs c <- cs pure (f a b c)  liftA :: Applicative f => (a -> b) -> f a -> f b # Lift a function to actions. This function may be used as a value for fmap in a Functor instance. | Using ApplicativeDo: 'liftA f as' can be understood as the do expression do a <- as pure (f a)  with an inferred Functor constraint, weaker than Applicative. (<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 # A variant of <*> with the arguments reversed. Using ApplicativeDo: 'as <**> fs' can be understood as the do expression do a <- as f <- fs pure (f a)  class Applicative f => Alternative (f :: Type -> Type) where # A monoid on applicative functors. If defined, some and many should be the least solutions of the equations: • some v = (:) <$> v <*> many v
• many v = some v <|> pure []

Minimal complete definition

Methods

(<|>) :: f a -> f a -> f a infixl 3 #

An associative binary operation

some :: f a -> f [a] #

One or more.

many :: f a -> f [a] #

Zero or more.

#### Instances

Instances details

guard :: Alternative f => Bool -> f () #

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty


#### Examples

Expand

Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

As an example of signaling an error in the error monad Maybe, consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x div y) otherwise. For example:

>>> safeDiv 4 0
Nothing
>>> safeDiv 4 2
Just 2


A definition of safeDiv using guards, but not guard:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x div y)
| otherwise = Nothing


A definition of safeDiv using guard and Monad do-notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
guard (y /= 0)
return (x div y)


class Applicative m => Monad (m :: Type -> Type) where #

The Monad class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions.

Instances of Monad should satisfy the following:

Left identity
return a >>= k = k a
Right identity
m >>= return = m
Associativity
m >>= (\x -> k x >>= h) = (m >>= k) >>= h

Furthermore, the Monad and Applicative operations should relate as follows:

• pure = return
• m1 <*> m2 = m1 >>= (x1 -> m2 >>= (x2 -> return (x1 x2)))

The above laws imply:

• fmap f xs  =  xs >>= return . f
• (>>) = (*>)

and that pure and (<*>) satisfy the applicative functor laws.

The instances of Monad for lists, Maybe and IO defined in the Prelude satisfy these laws.

Minimal complete definition

(>>=)

Methods

(>>=) :: m a -> (a -> m b) -> m b infixl 1 #

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

'as >>= bs' can be understood as the do expression

do a <- as
bs a


(>>) :: m a -> m b -> m b infixl 1 #

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

'as >> bs' can be understood as the do expression

do as
bs


return :: a -> m a #

Inject a value into the monadic type.

#### Instances

Instances details
 Monad [] Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: [a] -> (a -> [b]) -> [b] #(>>) :: [a] -> [b] -> [b] #return :: a -> [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #(>>) :: Maybe a -> Maybe b -> Maybe b #return :: a -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: IO a -> (a -> IO b) -> IO b #(>>) :: IO a -> IO b -> IO b #return :: a -> IO a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b #(>>) :: Par1 a -> Par1 b -> Par1 b #return :: a -> Par1 a # Instance detailsDefined in Language.Haskell.TH.Syntax Methods(>>=) :: Q a -> (a -> Q b) -> Q b #(>>) :: Q a -> Q b -> Q b #return :: a -> Q a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methods(>>=) :: Complex a -> (a -> Complex b) -> Complex b #(>>) :: Complex a -> Complex b -> Complex b #return :: a -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Min a -> (a -> Min b) -> Min b #(>>) :: Min a -> Min b -> Min b #return :: a -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Max a -> (a -> Max b) -> Max b #(>>) :: Max a -> Max b -> Max b #return :: a -> Max a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: First a -> (a -> First b) -> First b #(>>) :: First a -> First b -> First b #return :: a -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Last a -> (a -> Last b) -> Last b #(>>) :: Last a -> Last b -> Last b #return :: a -> Last a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(>>=) :: Option a -> (a -> Option b) -> Option b #(>>) :: Option a -> Option b -> Option b #return :: a -> Option a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methods(>>=) :: Identity a -> (a -> Identity b) -> Identity b #(>>) :: Identity a -> Identity b -> Identity b #return :: a -> Identity a # Since: base-4.3.0.0 Instance detailsDefined in GHC.Conc.Sync Methods(>>=) :: STM a -> (a -> STM b) -> STM b #(>>) :: STM a -> STM b -> STM b #return :: a -> STM a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methods(>>=) :: First a -> (a -> First b) -> First b #(>>) :: First a -> First b -> First b #return :: a -> First a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methods(>>=) :: Last a -> (a -> Last b) -> Last b #(>>) :: Last a -> Last b -> Last b #return :: a -> Last a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Dual a -> (a -> Dual b) -> Dual b #(>>) :: Dual a -> Dual b -> Dual b #return :: a -> Dual a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Sum a -> (a -> Sum b) -> Sum b #(>>) :: Sum a -> Sum b -> Sum b #return :: a -> Sum a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Product a -> (a -> Product b) -> Product b #(>>) :: Product a -> Product b -> Product b #return :: a -> Product a # Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methods(>>=) :: Down a -> (a -> Down b) -> Down b #(>>) :: Down a -> Down b -> Down b #return :: a -> Down a # Since: base-2.1 Instance detailsDefined in Text.ParserCombinators.ReadP Methods(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #(>>) :: ReadP a -> ReadP b -> ReadP b #return :: a -> ReadP a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #return :: a -> NonEmpty a # Instance detailsDefined in Data.Tree Methods(>>=) :: Tree a -> (a -> Tree b) -> Tree b #(>>) :: Tree a -> Tree b -> Tree b #return :: a -> Tree a # Instance detailsDefined in Data.Sequence.Internal Methods(>>=) :: Seq a -> (a -> Seq b) -> Seq b #(>>) :: Seq a -> Seq b -> Seq b #return :: a -> Seq a # Since: base-2.1 Instance detailsDefined in Text.ParserCombinators.ReadP Methods(>>=) :: P a -> (a -> P b) -> P b #(>>) :: P a -> P b -> P b #return :: a -> P a # Monad Parser Instance detailsDefined in Data.Csv.Conversion Methods(>>=) :: Parser a -> (a -> Parser b) -> Parser b #(>>) :: Parser a -> Parser b -> Parser b #return :: a -> Parser a # Monad Vector Instance detailsDefined in Data.Vector Methods(>>=) :: Vector a -> (a -> Vector b) -> Vector b #(>>) :: Vector a -> Vector b -> Vector b #return :: a -> Vector a # Monad Id Instance detailsDefined in Data.Vector.Fusion.Util Methods(>>=) :: Id a -> (a -> Id b) -> Id b #(>>) :: Id a -> Id b -> Id b #return :: a -> Id a # Monad Array Instance detailsDefined in Data.Primitive.Array Methods(>>=) :: Array a -> (a -> Array b) -> Array b #(>>) :: Array a -> Array b -> Array b #return :: a -> Array a # Monad Box Instance detailsDefined in Data.Vector.Fusion.Util Methods(>>=) :: Box a -> (a -> Box b) -> Box b #(>>) :: Box a -> Box b -> Box b #return :: a -> Box a # Monad ParserResult Instance detailsDefined in Options.Applicative.Types Methods(>>=) :: ParserResult a -> (a -> ParserResult b) -> ParserResult b #(>>) :: ParserResult a -> ParserResult b -> ParserResult b #return :: a -> ParserResult a # Monad ReadM Instance detailsDefined in Options.Applicative.Types Methods(>>=) :: ReadM a -> (a -> ReadM b) -> ReadM b #(>>) :: ReadM a -> ReadM b -> ReadM b #return :: a -> ReadM a # Monad SmallArray Instance detailsDefined in Data.Primitive.SmallArray Methods(>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b #(>>) :: SmallArray a -> SmallArray b -> SmallArray b #return :: a -> SmallArray a # Monad Root Instance detailsDefined in Numeric.RootFinding Methods(>>=) :: Root a -> (a -> Root b) -> Root b #(>>) :: Root a -> Root b -> Root b #return :: a -> Root a # Monad ParserM Instance detailsDefined in Options.Applicative.Types Methods(>>=) :: ParserM a -> (a -> ParserM b) -> ParserM b #(>>) :: ParserM a -> ParserM b -> ParserM b #return :: a -> ParserM a # Monad (Either e) Since: base-4.4.0.0 Instance detailsDefined in Data.Either Methods(>>=) :: Either e a -> (a -> Either e b) -> Either e b #(>>) :: Either e a -> Either e b -> Either e b #return :: a -> Either e a # Monad (U1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: U1 a -> (a -> U1 b) -> U1 b #(>>) :: U1 a -> U1 b -> U1 b #return :: a -> U1 a # Monoid a => Monad ((,) a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) #(>>) :: (a, a0) -> (a, b) -> (a, b) #return :: a0 -> (a, a0) # Monad (ST s) Since: base-2.1 Instance detailsDefined in GHC.ST Methods(>>=) :: ST s a -> (a -> ST s b) -> ST s b #(>>) :: ST s a -> ST s b -> ST s b #return :: a -> ST s a # Monad (ST s) Since: base-2.1 Instance detailsDefined in Control.Monad.ST.Lazy.Imp Methods(>>=) :: ST s a -> (a -> ST s b) -> ST s b #(>>) :: ST s a -> ST s b -> ST s b #return :: a -> ST s a # Monad m => Monad (WrappedMonad m) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #return :: a -> WrappedMonad m a # ArrowApply a => Monad (ArrowMonad a) Since: base-2.1 Instance detailsDefined in Control.Arrow Methods(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #return :: a0 -> ArrowMonad a a0 # Monad (Proxy :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methods(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #(>>) :: Proxy a -> Proxy b -> Proxy b #return :: a -> Proxy a # Monad m => Monad (MaybeT m) Instance detailsDefined in Control.Monad.Trans.Maybe Methods(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #return :: a -> MaybeT m a # Monad m => Monad (ListT m) Instance detailsDefined in Control.Monad.Trans.List Methods(>>=) :: ListT m a -> (a -> ListT m b) -> ListT m b #(>>) :: ListT m a -> ListT m b -> ListT m b #return :: a -> ListT m a # Monad (Parser i) Instance detailsDefined in Data.Attoparsec.Internal.Types Methods(>>=) :: Parser i a -> (a -> Parser i b) -> Parser i b #(>>) :: Parser i a -> Parser i b -> Parser i b #return :: a -> Parser i a # Representable f => Monad (Co f) Instance detailsDefined in Data.Functor.Rep Methods(>>=) :: Co f a -> (a -> Co f b) -> Co f b #(>>) :: Co f a -> Co f b -> Co f b #return :: a -> Co f a # Alternative f => Monad (Cofree f) Instance detailsDefined in Control.Comonad.Cofree Methods(>>=) :: Cofree f a -> (a -> Cofree f b) -> Cofree f b #(>>) :: Cofree f a -> Cofree f b -> Cofree f b #return :: a -> Cofree f a # Monad f => Monad (Rec1 f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b #(>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #return :: a -> Rec1 f a # (Monoid a, Monoid b) => Monad ((,,) a b) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methods(>>=) :: (a, b, a0) -> (a0 -> (a, b, b0)) -> (a, b, b0) #(>>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #return :: a0 -> (a, b, a0) # Monad m => Monad (Kleisli m a) Since: base-4.14.0.0 Instance detailsDefined in Control.Arrow Methods(>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b #(>>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #return :: a0 -> Kleisli m a a0 # Monad f => Monad (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methods(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #(>>) :: Ap f a -> Ap f b -> Ap f b #return :: a -> Ap f a # Monad f => Monad (Alt f) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b #(>>) :: Alt f a -> Alt f b -> Alt f b #return :: a -> Alt f a # (Applicative f, Monad f) => Monad (WhenMissing f x) Equivalent to ReaderT k (ReaderT x (MaybeT f)).Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methods(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b #(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #return :: a -> WhenMissing f x a # Monad m => Monad (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methods(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #return :: a -> ExceptT e m a # Monad m => Monad (IdentityT m) Instance detailsDefined in Control.Monad.Trans.Identity Methods(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b #(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #return :: a -> IdentityT m a # (Monad m, Error e) => Monad (ErrorT e m) Instance detailsDefined in Control.Monad.Trans.Error Methods(>>=) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b #(>>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #return :: a -> ErrorT e m a # Monad m => Monad (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader 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 # Monad m => Monad (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methods(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #(>>) :: StateT s m a -> StateT s m b -> StateT s m b #return :: a -> StateT s m a # Monad m => Monad (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methods(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #(>>) :: StateT s m a -> StateT s m b -> StateT s m b #return :: a -> StateT s m a # (Monoid w, Monad m) => Monad (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methods(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #return :: a -> WriterT w m a # (Monoid w, Monad m) => Monad (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methods(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #return :: a -> WriterT w m a # (Monoid w, Functor m, Monad m) => Monad (AccumT w m) Instance detailsDefined in Control.Monad.Trans.Accum Methods(>>=) :: AccumT w m a -> (a -> AccumT w m b) -> AccumT w m b #(>>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #return :: a -> AccumT w m a # Monad m => Monad (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.CPS Methods(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #return :: a -> WriterT w m a # Monad m => Monad (SelectT r m) Instance detailsDefined in Control.Monad.Trans.Select Methods(>>=) :: SelectT r m a -> (a -> SelectT r m b) -> SelectT r m b #(>>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #return :: a -> SelectT r m a # Monad (Tagged s) Instance detailsDefined in Data.Tagged Methods(>>=) :: Tagged s a -> (a -> Tagged s b) -> Tagged s b #(>>) :: Tagged s a -> Tagged s b -> Tagged s b #return :: a -> Tagged s a # Monad ((->) r :: Type -> Type) Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: (r -> a) -> (a -> r -> b) -> r -> b #(>>) :: (r -> a) -> (r -> b) -> r -> b #return :: a -> r -> a # (Monad f, Monad g) => Monad (f :*: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b #(>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #return :: a -> (f :*: g) a # (Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methods(>>=) :: (a, b, c, a0) -> (a0 -> (a, b, c, b0)) -> (a, b, c, b0) #(>>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #return :: a0 -> (a, b, c, a0) # (Monad f, Monad g) => Monad (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methods(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #(>>) :: Product f g a -> Product f g b -> Product f g b #return :: a -> Product f g a # (Monad f, Applicative f) => Monad (WhenMatched f x y) Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methods(>>=) :: WhenMatched f x y a -> (a -> WhenMatched f x y b) -> WhenMatched f x y b #(>>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #return :: a -> WhenMatched f x y a # (Applicative f, Monad f) => Monad (WhenMissing f k x) Equivalent to  ReaderT k (ReaderT x (MaybeT f)) .Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methods(>>=) :: WhenMissing f k x a -> (a -> WhenMissing f k x b) -> WhenMissing f k x b #(>>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #return :: a -> WhenMissing f k x a # Monad (ContT r m) Instance detailsDefined in Control.Monad.Trans.Cont Methods(>>=) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #(>>) :: ContT r m a -> ContT r m b -> ContT r m b #return :: a -> ContT r m a # Monad f => Monad (M1 i c f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b #(>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #return :: a -> M1 i c f a # (Monad f, Applicative f) => Monad (WhenMatched f k x y) Equivalent to  ReaderT k (ReaderT x (ReaderT y (MaybeT f))) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methods(>>=) :: WhenMatched f k x y a -> (a -> WhenMatched f k x y b) -> WhenMatched f k x y b #(>>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #return :: a -> WhenMatched f k x y a # (Monoid w, Monad m) => Monad (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methods(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #return :: a -> RWST r w s m a # (Monoid w, Monad m) => Monad (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methods(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #return :: a -> RWST r w s m a # Monad m => Monad (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.CPS Methods(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #return :: a -> RWST r w s m a #

class Functor (f :: Type -> Type) where #

A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b, preserving the structure of f. Furthermore f needs to adhere to the following:

Identity
fmap id == id
Composition
fmap (f . g) == fmap f . fmap g

Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds.

Minimal complete definition

fmap

Methods

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

Using ApplicativeDo: 'fmap f as' can be understood as the do expression

do a <- as
pure (f a)


with an inferred Functor constraint.

(<$) :: a -> f b -> f a infixl 4 # Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version. Using ApplicativeDo: 'a <$ bs' can be understood as the do expression

do bs
pure a


with an inferred Functor constraint.

#### Instances

Instances details
 Functor [] Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> [a] -> [b] #(<$) :: a -> [b] -> [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> Maybe a -> Maybe b #(<$) :: a -> Maybe b -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> IO a -> IO b #(<$) :: a -> IO b -> IO a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> Par1 a -> Par1 b #(<$) :: a -> Par1 b -> Par1 a # Instance detailsDefined in Language.Haskell.TH.Syntax Methodsfmap :: (a -> b) -> Q a -> Q b #(<$) :: a -> Q b -> Q a # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodsfmap :: (a -> b) -> Complex a -> Complex b #(<$) :: a -> Complex b -> Complex a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Min a -> Min b #(<$) :: a -> Min b -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Max a -> Max b #(<$) :: a -> Max b -> Max a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> First a -> First b #(<$) :: a -> First b -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Last a -> Last b #(<$) :: a -> Last b -> Last a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a -> b) -> Option a -> Option b #(<$) :: a -> Option b -> Option a # Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> ZipList a -> ZipList b #(<$) :: a -> ZipList b -> ZipList a # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodsfmap :: (a -> b) -> Identity a -> Identity b #(<$) :: a -> Identity b -> Identity a # Since: base-4.3.0.0 Instance detailsDefined in GHC.Conc.Sync Methodsfmap :: (a -> b) -> STM a -> STM b #(<$) :: a -> STM b -> STM a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodsfmap :: (a -> b) -> First a -> First b #(<$) :: a -> First b -> First a # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodsfmap :: (a -> b) -> Last a -> Last b #(<$) :: a -> Last b -> Last a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Dual a -> Dual b #(<$) :: a -> Dual b -> Dual a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Sum a -> Sum b #(<$) :: a -> Sum b -> Sum a # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Product a -> Product b #(<$) :: a -> Product b -> Product a # Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methodsfmap :: (a -> b) -> Down a -> Down b #(<$) :: a -> Down b -> Down a # Since: base-2.1 Instance detailsDefined in Text.ParserCombinators.ReadP Methodsfmap :: (a -> b) -> ReadP a -> ReadP b #(<$) :: a -> ReadP b -> ReadP a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> NonEmpty a -> NonEmpty b #(<$) :: a -> NonEmpty b -> NonEmpty a # Instance detailsDefined in Data.IntMap.Internal Methodsfmap :: (a -> b) -> IntMap a -> IntMap b #(<$) :: a -> IntMap b -> IntMap a # Instance detailsDefined in Data.Tree Methodsfmap :: (a -> b) -> Tree a -> Tree b #(<$) :: a -> Tree b -> Tree a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Seq a -> Seq b #(<$) :: a -> Seq b -> Seq a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> FingerTree a -> FingerTree b #(<$) :: a -> FingerTree b -> FingerTree a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Digit a -> Digit b #(<$) :: a -> Digit b -> Digit a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Node a -> Node b #(<$) :: a -> Node b -> Node a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> Elem a -> Elem b #(<$) :: a -> Elem b -> Elem a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> ViewL a -> ViewL b #(<$) :: a -> ViewL b -> ViewL a # Instance detailsDefined in Data.Sequence.Internal Methodsfmap :: (a -> b) -> ViewR a -> ViewR b #(<$) :: a -> ViewR b -> ViewR a # Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsfmap :: (a -> b) -> Doc a -> Doc b #(<$) :: a -> Doc b -> Doc a # Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsfmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b #(<$) :: a -> AnnotDetails b -> AnnotDetails a # Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsfmap :: (a -> b) -> Span a -> Span b #(<$) :: a -> Span b -> Span a # Since: base-4.8.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodsfmap :: (a -> b) -> P a -> P b #(<$) :: a -> P b -> P a # Instance detailsDefined in Data.Tuple.Only Methodsfmap :: (a -> b) -> Only a -> Only b #(<$) :: a -> Only b -> Only a # Functor Parser Instance detailsDefined in Data.Csv.Conversion Methodsfmap :: (a -> b) -> Parser a -> Parser b #(<$) :: a -> Parser b -> Parser a # Functor Vector Instance detailsDefined in Data.Vector Methodsfmap :: (a -> b) -> Vector a -> Vector b #(<$) :: a -> Vector b -> Vector a # Functor Id Instance detailsDefined in Data.Vector.Fusion.Util Methodsfmap :: (a -> b) -> Id a -> Id b #(<$) :: a -> Id b -> Id a # Functor Array Instance detailsDefined in Data.Primitive.Array Methodsfmap :: (a -> b) -> Array a -> Array b #(<$) :: a -> Array b -> Array a # Functor Box Instance detailsDefined in Data.Vector.Fusion.Util Methodsfmap :: (a -> b) -> Box a -> Box b #(<$) :: a -> Box b -> Box a # Functor Parser Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> Parser a -> Parser b #(<$) :: a -> Parser b -> Parser a # Functor ParserFailure Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> ParserFailure a -> ParserFailure b #(<$) :: a -> ParserFailure b -> ParserFailure a # Functor ParserInfo Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> ParserInfo a -> ParserInfo b #(<$) :: a -> ParserInfo b -> ParserInfo a # Functor ParserResult Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> ParserResult a -> ParserResult b #(<$) :: a -> ParserResult b -> ParserResult a # Functor ReadM Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> ReadM a -> ReadM b #(<$) :: a -> ReadM b -> ReadM a # Functor SmallArray Instance detailsDefined in Data.Primitive.SmallArray Methodsfmap :: (a -> b) -> SmallArray a -> SmallArray b #(<$) :: a -> SmallArray b -> SmallArray a # Functor Root Instance detailsDefined in Numeric.RootFinding Methodsfmap :: (a -> b) -> Root a -> Root b #(<$) :: a -> Root b -> Root a # Functor OptReader Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> OptReader a -> OptReader b #(<$) :: a -> OptReader b -> OptReader a # Functor Option Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> Option a -> Option b #(<$) :: a -> Option b -> Option a # Functor CReader Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> CReader a -> CReader b #(<$) :: a -> CReader b -> CReader a # Functor ParserM Instance detailsDefined in Options.Applicative.Types Methodsfmap :: (a -> b) -> ParserM a -> ParserM b #(<$) :: a -> ParserM b -> ParserM a # Since: base-3.0 Instance detailsDefined in Data.Either Methodsfmap :: (a0 -> b) -> Either a a0 -> Either a b #(<$) :: a0 -> Either a b -> Either a a0 # Functor (V1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> V1 a -> V1 b #(<$) :: a -> V1 b -> V1 a # Functor (U1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> U1 a -> U1 b #(<$) :: a -> U1 b -> U1 a # Functor ((,) a) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a0 -> b) -> (a, a0) -> (a, b) #(<$) :: a0 -> (a, b) -> (a, a0) # Functor (ST s) Since: base-2.1 Instance detailsDefined in GHC.ST Methodsfmap :: (a -> b) -> ST s a -> ST s b #(<$) :: a -> ST s b -> ST s a # Functor (Array i) Since: base-2.1 Instance detailsDefined in GHC.Arr Methodsfmap :: (a -> b) -> Array i a -> Array i b #(<$) :: a -> Array i b -> Array i a # Functor (Arg a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsfmap :: (a0 -> b) -> Arg a a0 -> Arg a b #(<$) :: a0 -> Arg a b -> Arg a a0 # Functor (ST s) Since: base-2.1 Instance detailsDefined in Control.Monad.ST.Lazy.Imp Methodsfmap :: (a -> b) -> ST s a -> ST s b #(<$) :: a -> ST s b -> ST s a # Monad m => Functor (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #(<$) :: a -> WrappedMonad m b -> WrappedMonad m a # Arrow a => Functor (ArrowMonad a) Since: base-4.6.0.0 Instance detailsDefined in Control.Arrow Methodsfmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 # Functor (Proxy :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methodsfmap :: (a -> b) -> Proxy a -> Proxy b #(<$) :: a -> Proxy b -> Proxy a # Functor (Map k) Instance detailsDefined in Data.Map.Internal Methodsfmap :: (a -> b) -> Map k a -> Map k b #(<$) :: a -> Map k b -> Map k a # Functor m => Functor (MaybeT m) Instance detailsDefined in Control.Monad.Trans.Maybe Methodsfmap :: (a -> b) -> MaybeT m a -> MaybeT m b #(<$) :: a -> MaybeT m b -> MaybeT m a # Functor m => Functor (ListT m) Instance detailsDefined in Control.Monad.Trans.List Methodsfmap :: (a -> b) -> ListT m a -> ListT m b #(<$) :: a -> ListT m b -> ListT m a # Functor (IResult i) Instance detailsDefined in Data.Attoparsec.Internal.Types Methodsfmap :: (a -> b) -> IResult i a -> IResult i b #(<$) :: a -> IResult i b -> IResult i a # Functor (Parser i) Instance detailsDefined in Data.Attoparsec.Internal.Types Methodsfmap :: (a -> b) -> Parser i a -> Parser i b #(<$) :: a -> Parser i b -> Parser i a # Functor (HashMap k) Instance detailsDefined in Data.HashMap.Internal Methodsfmap :: (a -> b) -> HashMap k a -> HashMap k b #(<$) :: a -> HashMap k b -> HashMap k a # Functor f => Functor (Co f) Instance detailsDefined in Data.Functor.Rep Methodsfmap :: (a -> b) -> Co f a -> Co f b #(<$) :: a -> Co f b -> Co f a # Functor f => Functor (Cofree f) Instance detailsDefined in Control.Comonad.Cofree Methodsfmap :: (a -> b) -> Cofree f a -> Cofree f b #(<$) :: a -> Cofree f b -> Cofree f a # Functor f => Functor (Rec1 f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> Rec1 f a -> Rec1 f b #(<$) :: a -> Rec1 f b -> Rec1 f a # Functor (URec Char :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Char a -> URec Char b #(<$) :: a -> URec Char b -> URec Char a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Double a -> URec Double b #(<$) :: a -> URec Double b -> URec Double a # Functor (URec Float :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Float a -> URec Float b #(<$) :: a -> URec Float b -> URec Float a # Functor (URec Int :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Int a -> URec Int b #(<$) :: a -> URec Int b -> URec Int a # Functor (URec Word :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Word a -> URec Word b #(<$) :: a -> URec Word b -> URec Word a # Functor (URec (Ptr ()) :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b #(<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a # Functor ((,,) a b) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methodsfmap :: (a0 -> b0) -> (a, b, a0) -> (a, b, b0) #(<$) :: a0 -> (a, b, b0) -> (a, b, a0) # Arrow a => Functor (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # Functor m => Functor (Kleisli m a) Since: base-4.14.0.0 Instance detailsDefined in Control.Arrow Methodsfmap :: (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #(<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 # Functor (Const m :: Type -> Type) Since: base-2.1 Instance detailsDefined in Data.Functor.Const Methodsfmap :: (a -> b) -> Const m a -> Const m b #(<$) :: a -> Const m b -> Const m a # Functor f => Functor (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methodsfmap :: (a -> b) -> Ap f a -> Ap f b #(<$) :: a -> Ap f b -> Ap f a # Functor f => Functor (Alt f) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsfmap :: (a -> b) -> Alt f a -> Alt f b #(<$) :: a -> Alt f b -> Alt f a # (Applicative f, Monad f) => Functor (WhenMissing f x) Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methodsfmap :: (a -> b) -> WhenMissing f x a -> WhenMissing f x b #(<$) :: a -> WhenMissing f x b -> WhenMissing f x a # Functor m => Functor (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methodsfmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b #(<$) :: a -> ExceptT e m b -> ExceptT e m a # Functor m => Functor (IdentityT m) Instance detailsDefined in Control.Monad.Trans.Identity Methodsfmap :: (a -> b) -> IdentityT m a -> IdentityT m b #(<$) :: a -> IdentityT m b -> IdentityT m a # Functor m => Functor (ErrorT e m) Instance detailsDefined in Control.Monad.Trans.Error Methodsfmap :: (a -> b) -> ErrorT e m a -> ErrorT e m b #(<$) :: a -> ErrorT e m b -> ErrorT e m a # Functor m => Functor (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader Methodsfmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b #(<$) :: a -> ReaderT r m b -> ReaderT r m a # Functor m => Functor (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methodsfmap :: (a -> b) -> StateT s m a -> StateT s m b #(<$) :: a -> StateT s m b -> StateT s m a # Functor m => Functor (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methodsfmap :: (a -> b) -> StateT s m a -> StateT s m b #(<$) :: a -> StateT s m b -> StateT s m a # Functor m => Functor (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor m => Functor (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor m => Functor (AccumT w m) Instance detailsDefined in Control.Monad.Trans.Accum Methodsfmap :: (a -> b) -> AccumT w m a -> AccumT w m b #(<$) :: a -> AccumT w m b -> AccumT w m a # Functor m => Functor (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.CPS Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor m => Functor (SelectT r m) Instance detailsDefined in Control.Monad.Trans.Select Methodsfmap :: (a -> b) -> SelectT r m a -> SelectT r m b #(<$) :: a -> SelectT r m b -> SelectT r m a # Monad m => Functor (Bundle m v) Instance detailsDefined in Data.Vector.Fusion.Bundle.Monadic Methodsfmap :: (a -> b) -> Bundle m v a -> Bundle m v b #(<$) :: a -> Bundle m v b -> Bundle m v a # Functor v => Functor (Vector v n) Instance detailsDefined in Data.Vector.Generic.Sized.Internal Methodsfmap :: (a -> b) -> Vector v n a -> Vector v n b #(<$) :: a -> Vector v n b -> Vector v n a # Functor (Tagged s) Instance detailsDefined in Data.Tagged Methodsfmap :: (a -> b) -> Tagged s a -> Tagged s b #(<$) :: a -> Tagged s b -> Tagged s a # Bifunctor p => Functor (Join p) Instance detailsDefined in Data.Bifunctor.Join Methodsfmap :: (a -> b) -> Join p a -> Join p b #(<$) :: a -> Join p b -> Join p a # Functor ((->) r :: Type -> Type) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> (r -> a) -> r -> b #(<$) :: a -> (r -> b) -> r -> a # Functor (K1 i c :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> K1 i c a -> K1 i c b #(<$) :: a -> K1 i c b -> K1 i c a # (Functor f, Functor g) => Functor (f :+: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b #(<$) :: a -> (f :+: g) b -> (f :+: g) a # (Functor f, Functor g) => Functor (f :*: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b #(<$) :: a -> (f :*: g) b -> (f :*: g) a # Functor ((,,,) a b c) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methodsfmap :: (a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #(<$) :: a0 -> (a, b, c, b0) -> (a, b, c, a0) # (Functor f, Functor g) => Functor (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methodsfmap :: (a -> b) -> Product f g a -> Product f g b #(<$) :: a -> Product f g b -> Product f g a # (Functor f, Functor g) => Functor (Sum f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Sum Methodsfmap :: (a -> b) -> Sum f g a -> Sum f g b #(<$) :: a -> Sum f g b -> Sum f g a # Functor f => Functor (WhenMatched f x y) Since: containers-0.5.9 Instance detailsDefined in Data.IntMap.Internal Methodsfmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a # (Applicative f, Monad f) => Functor (WhenMissing f k x) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methodsfmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a # Functor (ContT r m) Instance detailsDefined in Control.Monad.Trans.Cont Methodsfmap :: (a -> b) -> ContT r m a -> ContT r m b #(<$) :: a -> ContT r m b -> ContT r m a # Functor f => Functor (M1 i c f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> M1 i c f a -> M1 i c f b #(<$) :: a -> M1 i c f b -> M1 i c f a # (Functor f, Functor g) => Functor (f :.: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b #(<$) :: a -> (f :.: g) b -> (f :.: g) a # (Functor f, Functor g) => Functor (Compose f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Compose Methodsfmap :: (a -> b) -> Compose f g a -> Compose f g b #(<$) :: a -> Compose f g b -> Compose f g a # Functor f => Functor (WhenMatched f k x y) Since: containers-0.5.9 Instance detailsDefined in Data.Map.Internal Methodsfmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a # Functor m => Functor (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<$) :: a -> RWST r w s m b -> RWST r w s m a # Functor m => Functor (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<$) :: a -> RWST r w s m b -> RWST r w s m a # Functor m => Functor (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.CPS Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<\$) :: a -> RWST r w s m b -> RWST r w s m a # Functor (Clown f a :: Type -> Type) Instance detailsDefined in Data.Bifunctor.Clown