Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides a simple way for the end-user deriving the mechanical, yet long, Element instances for a family.
We are borrowing a some code from generic-sop ( https://hackage.haskell.org/package/generics-sop-0.3.2.0/docs/src/Generics-SOP-TH.html )
Documentation
deriveFamilyWith :: Name -> Q Type -> Q [Dec] Source #
Given the name of the first element in the family, derives:
- The other types in the family and Konstant types one needs.
- the SOP code for each of the datatypes involved
- One
Element
instance per datatype - Metadada information for each of the datatypes involved
- Uses the opaque-type universe provided.