TH doesn't verify name types during conversion
Angerman reported that a use of the `deriveEq` splice is causing GHC to abort with an assertion failure:
zonkExpr env (HsVar x (L l id))
= ASSERT2( isNothing (isDataConId_maybe id), ppr id )
return (HsVar x (L l (zonkIdOcc env id)))
I suspect the deriveEq1
is calling varE
with a DataCon name. We should catch this case and throw a better error message.
Edited by Ben Gamari