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 |
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.
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 instanceDeclaration :: UnifiedInstance -> [[(TyVarBndrUnit, Maybe Type)]] -> [Pred] -> [Type] -> Q [Dec] Source # |
A strategy for deriving instances.