generics-mrsop-1.0.0.1: Generic Programming with Mutually Recursive Sums of Products.

Safe HaskellNone
LanguageHaskell2010

Generics.MRSOP.TH

Description

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 )

Synopsis

Documentation

deriveFamily :: Q Type -> Q [Dec] Source #

Given the name of the first element in the family, derives:

  1. The other types in the family and Konstant types one needs.
  2. the SOP code for each of the datatypes involved
  3. One Element instance per datatype TODO: 4. Metadada information for each of the datatypes involved

genFamilyDebug :: STy -> [(STy, Int, DTI IK)] -> Q [Dec] Source #

Generates a bunch of strings for debug purposes.