Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
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.
deriveMutableE :: [Name] -> Name -> DecsQfitspec Test.FitSpec.Derive Derives a Mutable instance for a given type Name using a given context for all type variables.
deriveCoSinkable :: Name -> Name -> Q [Dec]free-foil Control.Monad.Foil.TH.MkInstancesFoil Generate Sinkable and CoSinkable instances.
deriveUnifiablePattern :: Name -> Name -> Q [Dec]free-foil Control.Monad.Foil.TH.MkInstancesFoil Generate Sinkable and CoSinkable instances.
deriveZipMatch :: Name -> Q [Dec]free-foil Control.Monad.Free.Foil.TH.ZipMatch Generate ZipMatch instance for a given bifunctor.
deriveFromGraphQL :: Name -> Q [Dec]graphql-spice Language.GraphQL.Class Given a type derives a FromGraphQL instance for it. The derivation can only work when all nested types already have FromGraphQL instances. The following cases are supported:
- Records encode input objects.
- Sum types with all data constructors without parameters encode Enums.
deriveToGraphQL :: Name -> Q [Dec]graphql-spice Language.GraphQL.Class Given a type derives a ToGraphQL instance for it. The derivation can only work when all nested types already have ToGraphQL instances. The following cases are supported:
- Records are decoded as objects.
- Sum types with all data constructors without parameters are decoded as Enums.
- Sum types whose data constructors have exactly one parameter are decoded as Unions.