I’m generally clueless about TH but I’m trying to be good and use it to keep my types from getting out of sync between Dhall and Haskell. However, I have nonempty lists in my Dhall in the form { head : a, tail : List a }
, and this precludes me from using makeHaskellTypes
for any of my Dhall types that have such nonempty lists as fields.
Is there any way to get makeHaskellTypes
to recognize fields of that form as NonEmpty
s? Just making a FromDhall
instance for NonEmpty
isn’t enough. I’m unsure if I could even write a NonEmpty
newtype
as I don’t know if makeHaskellTypes
will work for * -> *
kinds, and having to make a bunch of different NonEmptyInts
, NonEmptyNaturals
, NonEmptyText
types everywhere would hopelessly clutter the Haskell side of things.