Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
deriveVia :: Q Type -> Q [Dec]deriving-compat Data.Deriving.Via.Internal 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).deriveViaDecs :: Type -> Maybe Type -> Q [Dec]deriving-compat Data.Deriving.Via.Internal No documentation available.
deriveViaDecs' :: Name -> [TyVarBndr_ flag] -> [Type] -> Type -> Dec -> Q (Maybe [Dec])deriving-compat Data.Deriving.Via.Internal No documentation available.
-
deriving-compat Data.Enum.Deriving Generates an Enum instance declaration for the given data type or data family instance.
-
deriving-compat Data.Enum.Deriving.Internal Generates an Enum instance declaration for the given data type or data family instance.
-
deriving-compat Data.Eq.Deriving Generates an Eq instance declaration for the given data type or data family instance.
-
deriving-compat Data.Eq.Deriving Generates an Eq1 instance declaration for the given data type or data family instance.
-
deriving-compat Data.Eq.Deriving Generates an Eq2 instance declaration for the given data type or data family instance. This function is not available with transformers-0.4.
-
deriving-compat Data.Eq.Deriving.Internal Generates an Eq instance declaration for the given data type or data family instance.
-
deriving-compat Data.Eq.Deriving.Internal Generates an Eq1 instance declaration for the given data type or data family instance.