I’m using the singletons
and singletons-th
libraries, and I want (if possible) to split a singleton definition between files. I tried creating a data family, but I’m getting a Declaration cannot be promoted
error.
data family Field
data family SField :: Field -> Type
singletons
[d|
data instance Field = Field1 | Field2
|]
>>> Other file:
singletons
[d|
data instance Field = Field3
|]
How could I split the singleton definition between two or more files?