Generates a Foldable instance declaration for the given data type or data family instance.
Modulederiving-compat-0.6.8Haskell2010
Data.Functor.Deriving.Internal
The machinery needed to derive Foldable, Functor, and Traversable instances.
For more info on how deriving Functor works, see
this GHC wiki page.
Note: this is an internal module, and as such, the API presented here is not guaranteed to be stable, even between minor releases of this library.
- 1 type
- 29 values
- Packagederiving-compat-0.6.8
- Exports30
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceInternal.hs
Foldable
12 declarationsLike deriveFoldable, but takes an FFTOptions argument.
Like makeFoldMap, but takes an FFTOptions argument.
Like makeFoldr, but takes an FFTOptions argument.
Generates a lambda expression which behaves like fold (without requiring a
Foldable instance).
Like makeFold, but takes an FFTOptions argument.
Like makeFoldl, but takes an FFTOptions argument.
Like makeNull, but takes an FFTOptions argument.
Functor
6 declarationsGenerates a Functor instance declaration for the given data type or data family instance.
Like deriveFunctor, but takes an FFTOptions argument.
Like makeFmap, but takes an FFTOptions argument.
Like makeReplace, but takes an FFTOptions argument.
Traversable
10 declarationsGenerates a Traversable instance declaration for the given data type or data family instance.
Like deriveTraverse, but takes an FFTOptions argument.
Generates a lambda expression which behaves like traverse (without requiring a Traversable instance).
Like makeTraverse, but takes an FFTOptions argument.
Generates a lambda expression which behaves like sequenceA (without requiring a Traversable instance).
Like makeSequenceA, but takes an FFTOptions argument.
Generates a lambda expression which behaves like mapM (without requiring a Traversable instance).
Like makeMapM, but takes an FFTOptions argument.
Generates a lambda expression which behaves like sequence (without requiring a Traversable instance).
Like makeSequence, but takes an FFTOptions argument.
FFTOptions
2 declarationsOptions that further configure how the functions in Data.Functor.Deriving
should behave. (FFT stands for FunctorFoldableTraversable.)
Constructors
Instances4Eq, Ord, Read, Show
Eq FFTOptionsDefined in deriving-compat-0.6.8 · Data.Functor.Deriving.InternalOrd FFTOptionsDefined in deriving-compat-0.6.8 · Data.Functor.Deriving.InternalRead FFTOptionsDefined in deriving-compat-0.6.8 · Data.Functor.Deriving.InternalShow FFTOptionsDefined in deriving-compat-0.6.8 · Data.Functor.Deriving.Internal
Conservative FFTOptions that doesn't attempt to use EmptyCase (to
prevent users from having to enable that extension at use sites.)