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.
deriveInvariant :: Name -> Q [Dec]invariant Data.Functor.Invariant.TH Generates an Invariant instance declaration for the given data type or data family instance.
deriveInvariant2 :: Name -> Q [Dec]invariant Data.Functor.Invariant.TH Generates an Invariant2 instance declaration for the given data type or data family instance.
deriveInvariant2Options :: Options -> Name -> Q [Dec]invariant Data.Functor.Invariant.TH Like deriveInvariant2, but takes an Options argument.
deriveInvariantOptions :: Options -> Name -> Q [Dec]invariant Data.Functor.Invariant.TH Like deriveInvariant, but takes an Options argument.
deriveBounded :: Name -> Q [Dec]deriving-compat Data.Bounded.Deriving Generates a Bounded instance declaration for the given data type or data family instance.
deriveBounded :: Name -> Q [Dec]deriving-compat Data.Bounded.Deriving.Internal Generates a Bounded instance declaration for the given data type or data family instance.
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.
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) |])
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).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) |])