Safe Haskell | None |
---|---|
Language | Haskell2010 |
Deprecated: Import Data.Generics.Is.TH directly, or port your code to using Data.Generics.Is.Generic.
Synopsis
- module Data.Generics.Is.TH
Documentation
Generate predicates from constructor names or from quoted patterns.
We provide three implementations of the functions is
and isNot
, each
relying on a different generic programming technique.
- Template Haskell
- Data.Generics.Is.TH. Most flexible and efficient, works on GADTs. Requires access to the type declaration; it can also declare predicate functions from each constructor of a given type.
- Generics
- Data.Generics.Is.Generic. Safe. Requires an instance of
Generic
. It performs faster than SYB, according to this StackOverflow answer. - Scrap Your Boilerplate
- Data.Generics.Is.Data.
Safe. Works only on monomorphic values.
Requires an instance of
Data
.
module Data.Generics.Is.TH