Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapperIsLabelDeriver :: Deriver

    domain Domain

    Generates instances of IsLabel for sums and products, providing mappers over their components.

    Product Example

    Having the following schema:
    NetworkAddress:
    product:
    protocol: TransportProtocol
    host: Host
    port: Word16
    
    The following instances will be generated:
    instance
    mapper ~ (TransportProtocol -> TransportProtocol) =>
    IsLabel "protocol" (mapper -> NetworkAddress -> NetworkAddress)
    where
    fromLabel mapper (NetworkAddress a b c) =
    NetworkAddress (mapper a) b c
    
    instance
    mapper ~ (Host -> Host) =>
    IsLabel "host" (mapper -> NetworkAddress -> NetworkAddress)
    where
    fromLabel mapper (NetworkAddress a b c) =
    NetworkAddress a (mapper b) c
    
    instance
    mapper ~ (Word16 -> Word16) =>
    IsLabel "port" (mapper -> NetworkAddress -> NetworkAddress)
    where
    fromLabel mapper (NetworkAddress a b c) =
    NetworkAddress a b (mapper c)
    
    In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.

    Sum Example

    Having the following schema:
    Host:
    sum:
    ip: Ip
    name: Text
    
    The following instances will be generated:
    instance
    mapper ~ (Ip -> Ip) =>
    IsLabel "ip" (mapper -> Host -> Host)
    where
    fromLabel fn (IpHost a) = IpHost (fn a)
    fromLabel _ a = a
    
    instance
    mapper ~ (Text -> Text) =>
    IsLabel "name" (mapper -> Host -> Host)
    where
    fromLabel fn (NameHost a) = NameHost (fn a)
    fromLabel _ a = a
    
    In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.

  2. ordDeriver :: Deriver

    domain Domain

    Derives Ord. Requires to have the StandaloneDeriving compiler extension enabled.

  3. showDeriver :: Deriver

    domain Domain

    Derives Show. Requires to have the StandaloneDeriving compiler extension enabled.

  4. stdDeriver :: Deriver

    domain Domain

    Combination of all derivers exported by this module.

  5. typeableDeriver :: Deriver

    domain Domain

    Derives Typeable. Requires to have the StandaloneDeriving and DeriveDataTypeable compiler extensions enabled.

  6. reallyDeriveCascading :: Name -> (Name -> DecsQ) -> Name -> DecsQ

    express Data.Express.Utils.TH

    No documentation available.

  7. defineHasPrimaryConstraintInstanceDerived :: TypeQ -> Q [Dec]

    persistable-record Database.Record.TH

    Template of HasKeyConstraint instance.

  8. defaultDeriveOptions :: DeriveOptions

    avro Data.Avro.Deriving

    Default deriving options

    defaultDeriveOptions = DeriveOptions
    { fieldNameBuilder  = mkPrefixedFieldName
    , fieldStrictness   = mkLazyField
    , namespaceBehavior = IgnoreNamespaces
    }
    

  9. type CanDeriveApplicativeB (b :: k -> Type -> Type) (f :: k -> Type) (g :: k -> Type) = (GenericP 0 b f, GenericP 0 b g, GenericP 0 b Product f g, GApplicative 0 f g RepP 0 b f RepP 0 b g RepP 0 b Product f g)

    barbies Barbies.Internal

    CanDeriveApplicativeB B f g is in practice a predicate about B only. Intuitively, it says that the following holds, for any arbitrary f:

    • There is an instance of Generic (B f).
    • B has only one constructor (that is, it is not a sum-type).
    • Every field of B f is either a monoid, or of the form f a, for some type a.

  10. type CanDeriveApplicativeT (t :: k -> Type -> k1 -> Type) (f :: k -> Type) (g :: k -> Type) (x :: k1) = (GenericP 1 t f x, GenericP 1 t g x, GenericP 1 t Product f g x, GApplicative 1 f g RepP 1 t f x RepP 1 t g x RepP 1 t Product f g x)

    barbies Barbies.Internal

    CanDeriveApplicativeT T f g x is in practice a predicate about T only. Intuitively, it says that the following holds, for any arbitrary f:

    • There is an instance of Generic (T f).
    • T has only one constructor (that is, it is not a sum-type).
    • Every field of T f x is either a monoid, or of the form f a, for some type a.

Page 94 of many | Previous | Next