| Copyright | (c) Sirui Lu 2024 |
|---|---|
| License | BSD-3-Clause (see the LICENSE file) |
| Maintainer | siruilu@cs.washington.edu |
| Stability | Experimental |
| Portability | GHC only |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Grisette.Internal.TH.DeriveInstanceProvider
Description
Synopsis
- class DeriveInstanceProvider provider where
- instanceDeclaration :: provider -> [[(TyVarBndrUnit, Maybe Type)]] -> [Pred] -> [Type] -> Q [Dec]
- data Strategy
- = Stock { }
- | WithNewtype { }
- | ViaDefault { }
- | ViaDefault1 { }
- | Anyclass { }
Documentation
class DeriveInstanceProvider provider where Source #
A derive instance provider provides the instance declaration.
Methods
instanceDeclaration :: provider -> [[(TyVarBndrUnit, Maybe Type)]] -> [Pred] -> [Type] -> Q [Dec] Source #
Instances
| DeriveInstanceProvider Strategy Source # | |
Defined in Grisette.Internal.TH.DeriveInstanceProvider | |
| DeriveInstanceProvider UnifiedInstance Source # | |
Defined in Grisette.Internal.TH.DeriveUnifiedInterface Methods instanceDeclaration :: UnifiedInstance -> [[(TyVarBndrUnit, Maybe Type)]] -> [Pred] -> [Type] -> Q [Dec] Source # | |
A strategy for deriving instances.
Constructors
| Stock | |
Fields | |
| WithNewtype | |
Fields | |
| ViaDefault | |
Fields | |
| ViaDefault1 | |
Fields | |
| Anyclass | |
Fields | |