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.
deriveGeneralizable :: Name -> DecsQextrapolate Test.Extrapolate.Generalizable.Derive Derives a Generalizable instance for a given type Name. If needed, this function also automatically derivates Listable, Express and Name instances using respectively deriveListable, deriveExpress and deriveName. Consider the following Stack datatype:
data Stack a = Stack a (Stack a) | Empty
WritingderiveGeneralizable ''Stack
will automatically derive the following Generalizable instance:instance Generalizable a => Generalizable (Stack a) where instances s = this "s" s $ let Stack x y = Stack undefined undefined `asTypeOf` s in instances x . instances y
This function needs the TemplateHaskell extension.deriveGeneralizableCascading :: Name -> DecsQextrapolate Test.Extrapolate.Generalizable.Derive Derives a Generalizable instance for a given type Name cascading derivation of type arguments as well.
deriveGeneralizableIfNeeded :: Name -> DecsQextrapolate Test.Extrapolate.Generalizable.Derive Same as deriveGeneralizable but does not warn when instance already exists (deriveGeneralizable is preferable).
deriveMutable :: Name -> DecsQfitspec Test.FitSpec Derives Mutable, ShowMutable and (optionally) Listable instances for a given type Name. Consider the following Stack datatype:
data Stack a = Stack a (Stack a) | Empty
WritingderiveMutable ''Stack
will automatically derive the following Listable, Mutable and ShowMutable instances:instance Listable a => Listable (Stack a) where tiers = cons2 Stack \/ cons0 Empty instance (Eq a, Listable a) => Mutable a where mutiers = mutiersEq instance (Eq a, Show a) => ShowMutable a where mutantS = mutantSEq
If a Listable instance already exists, it is not derived. (cf.: deriveListable) Needs the TemplateHaskell extension.deriveMutableCascading :: Name -> DecsQfitspec Test.FitSpec No documentation available.
deriveMutableCascadingE :: [Name] -> Name -> DecsQfitspec Test.FitSpec No documentation available.
deriveMutableE :: [Name] -> Name -> DecsQfitspec Test.FitSpec Derives a Mutable instance for a given type Name using a given context for all type variables.
deriveMutable :: Name -> DecsQfitspec Test.FitSpec.Derive Derives Mutable, ShowMutable and (optionally) Listable instances for a given type Name. Consider the following Stack datatype:
data Stack a = Stack a (Stack a) | Empty
WritingderiveMutable ''Stack
will automatically derive the following Listable, Mutable and ShowMutable instances:instance Listable a => Listable (Stack a) where tiers = cons2 Stack \/ cons0 Empty instance (Eq a, Listable a) => Mutable a where mutiers = mutiersEq instance (Eq a, Show a) => ShowMutable a where mutantS = mutantSEq
If a Listable instance already exists, it is not derived. (cf.: deriveListable) Needs the TemplateHaskell extension.deriveMutableCascading :: Name -> DecsQfitspec Test.FitSpec.Derive No documentation available.
deriveMutableCascadingE :: [Name] -> Name -> DecsQfitspec Test.FitSpec.Derive No documentation available.