Commit d9741ad
committed
RFC: TH support for data families
This leverages the `th-abstraction` library to grant
`Generics.SOP.TH` the ability to generate code for vanilla data types
and data families alike. This patch looks large, but most of it is
internal refactoring to use `th-abstraction`'s intermediate data
types where necessary (e.g., `DatatypeInfo` instead of `Dec`,
`ConstructorInfo` instead of `Con`, etc.).
This does incur an extra library dependency in `th-abstraction`,
but it's a very small one, as it does not depend on any non-GHC-boot
libraries itself. It's also used by other libraries to enable
data family support, such as `aeson` and `th-lift`.
Fixes #111 along the way.1 parent 760fabe commit d9741ad
File tree
3 files changed
+265
-178
lines changed- generics-sop
- src/Generics/SOP
- test
3 files changed
+265
-178
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
0 commit comments