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 )
- deriveFamily :: Q Type -> Q [Dec]
- genFamilyDebug :: STy -> [(STy, Int, DTI IK)] -> Q [Dec]
Documentation
deriveFamily :: 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 TODO: 4. Metadada information for each of the datatypes involved