Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. deriveInvariant :: Name -> Q [Dec]

    invariant Data.Functor.Invariant.TH

    Generates an Invariant instance declaration for the given data type or data family instance.

  2. deriveInvariant2 :: Name -> Q [Dec]

    invariant Data.Functor.Invariant.TH

    Generates an Invariant2 instance declaration for the given data type or data family instance.

  3. deriveInvariant2Options :: Options -> Name -> Q [Dec]

    invariant Data.Functor.Invariant.TH

    Like deriveInvariant2, but takes an Options argument.

  4. deriveInvariantOptions :: Options -> Name -> Q [Dec]

    invariant Data.Functor.Invariant.TH

    Like deriveInvariant, but takes an Options argument.

  5. deriveBounded :: Name -> Q [Dec]

    deriving-compat Data.Bounded.Deriving

    Generates a Bounded instance declaration for the given data type or data family instance.

  6. deriveBounded :: Name -> Q [Dec]

    deriving-compat Data.Bounded.Deriving.Internal

    Generates a Bounded instance declaration for the given data type or data family instance.

  7. deriveConstraint :: ClassRep a => a -> Type -> (Maybe Pred, [Name])

    deriving-compat Data.Deriving.Internal

    Attempt to derive a constraint on a Type. If successful, return Just the constraint and any kind variable names constrained to *. Otherwise, return Nothing and the empty list. See Note [Type inference in derived instances] for the heuristics used to come up with constraints.

  8. deriveGND :: Q Type -> Q [Dec]

    deriving-compat Data.Deriving.Via

    Generates an instance for a type class at a newtype by emulating the behavior of the GeneralizedNewtypeDeriving extension. For example:

    newtype Foo a = MkFoo a
    $(deriveGND [t| forall a. Eq a => Eq (Foo a) |])
    

  9. deriveVia :: Q Type -> Q [Dec]

    deriving-compat Data.Deriving.Via

    Generates an instance for a type class by emulating the behavior of the DerivingVia extension. For example:

    newtype Foo a = MkFoo a
    $(deriveVia [t| forall a. Ord a => Ord (Foo a) `Via` Down a |])
    
    As shown in the example above, the syntax is a tad strange. One must specify the type by which to derive the instance using the Via type. This requirement is in place to ensure that the type variables are scoped correctly across all the types being used (e.g., to make sure that the same a is used in Ord a, Ord (Foo a), and Down a).

  10. deriveGND :: Q Type -> Q [Dec]

    deriving-compat Data.Deriving.Via.Internal

    Generates an instance for a type class at a newtype by emulating the behavior of the GeneralizedNewtypeDeriving extension. For example:

    newtype Foo a = MkFoo a
    $(deriveGND [t| forall a. Eq a => Eq (Foo a) |])
    

Page 10 of many | Previous | Next