Generates a Show instance declaration for the given data type or data family instance.
Modulederiving-compat-0.6.8Haskell2010
Text.Show.Deriving
Exports functions to mechanically derive Show, Show1, and Show2 instances.
Note that upstream GHC does not have the ability to derive Show1 or Show2
instances, but since the functionality to derive Show extends very naturally
Show1 and Show2, the ability to derive the latter two classes is provided as a
convenience.
- 1 type
- 26 values
- Packagederiving-compat-0.6.8
- Exports27
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceDeriving.hs
Show
8 declarationsLike deriveShow, but takes a ShowOptions argument.
Like makeShowsPrec, but takes a ShowOptions argument.
Like makeShow, but takes a ShowOptions argument.
Like makeShowList, but takes a ShowOptions argument.
Show1
8 declarationsGenerates a Show1 instance declaration for the given data type or data
family instance.
Like deriveShow1, but takes a ShowOptions argument.
Generates a lambda expression which behaves like liftShowsPrec (without
requiring a Show1 instance).
This function is not available with transformers-0.4.
Like makeLiftShowsPrec, but takes a ShowOptions argument.
This function is not available with transformers-0.4.
Generates a lambda expression which behaves like liftShowList (without
requiring a Show instance).
This function is not available with transformers-0.4.
Like makeLiftShowList, but takes a ShowOptions argument.
This function is not available with transformers-0.4.
Generates a lambda expression which behaves like showsPrec1 (without
requiring a Show1 instance).
Like makeShowsPrec1, but takes a ShowOptions argument.
Show2
8 declarationsGenerates a Show2 instance declaration for the given data type or data
family instance.
This function is not available with transformers-0.4.
Like deriveShow2, but takes a ShowOptions argument.
This function is not available with transformers-0.4.
Generates a lambda expression which behaves like liftShowsPrec2 (without
requiring a Show2 instance).
This function is not available with transformers-0.4.
Like makeLiftShowsPrec2, but takes a ShowOptions argument.
This function is not available with transformers-0.4.
Generates a lambda expression which behaves like liftShowList2 (without
requiring a Show instance).
This function is not available with transformers-0.4.
Like makeLiftShowList2, but takes a ShowOptions argument.
This function is not available with transformers-0.4.
Generates a lambda expression which behaves like showsPrec2 (without
requiring a Show2 instance).
This function is not available with transformers-0.4.
Like makeShowsPrec2, but takes a ShowOptions argument.
This function is not available with transformers-0.4.
ShowOptions
3 declarationsOptions that further configure how the functions in Text.Show.Deriving should behave.
Constructors
Instances4Eq, Ord, Read, Show
Eq ShowOptionsDefined in deriving-compat-0.6.8 · Text.Show.Deriving.InternalOrd ShowOptionsDefined in deriving-compat-0.6.8 · Text.Show.Deriving.InternalRead ShowOptionsDefined in deriving-compat-0.6.8 · Text.Show.Deriving.InternalShow ShowOptionsDefined in deriving-compat-0.6.8 · Text.Show.Deriving.Internal
ShowOptions that match the behavior of the most recent GHC release.
ShowOptions that match the behavior of the installed version of GHC.
deriveShow limitations
0 declarationsBe aware of the following potential gotchas:
Type variables of kind
*are assumed to have Show constraints. Type variables of kind* -> *are assumed to haveShow1constraints. Type variables of kind* -> * -> *are assumed to haveShow2constraints. If this is not desirable, use makeShowsPrec or one of its cousins.The
Show1class had a different definition intransformers-0.4, and as a result, deriveShow1 implements different instances for thetransformers-0.4Show1than it otherwise does. Also, makeLiftShowsPrec and makeLiftShowList are not available when this library is built againsttransformers-0.4, only 'makeShowsPrec1.The
Show2class is not available intransformers-0.4, and as a result, neither are Template Haskell functions that deal withShow2when this library is built againsttransformers-0.4.