Copyright | (c) Justin Le 2018 |
---|---|
License | BSD-3 |
Maintainer | justin@jle.im |
Stability | unstable |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Lift polymorphic typeclass over product types using Generics.
This module has two main purposes:
- Write methods to lift methods of typeclasses to product types
- Write default/automatic instances for your typeclasses so users can auto-derive them
These functions can be used to lift polymorphic functions on any type
(deriving Generic
) that has a single constructor, where every field is
an instance of the class constraint of the function being lifted.
See README for details on usage instructions and motivations.
Documentation
genericLift1 :: forall a c. (Generic a, GLift c (Rep a)) => (forall b. c b => b -> b) -> a -> a Source #