
12 Mar
2015
12 Mar
'15
7:05 a.m.
Dear Michael, Michael Jones wrote:
I’m stuck getting a TH expansion to compile. When I take the generated code and compile it directly, it is fine. But when expanding and compiling, it fails.
The problem seems related to instanceD, where I provide the type as:
(appT (appT (conT devName') (varT $ mkName "Word8")) (varT $ mkName "BV”))
[...]
Illegal type variable name: ‘BV’
Indeed BV is the name of a type *constructor*, not a type *variable*, so you need to use `conT` instead of `varT`: (appT (appT (conT devName') (conT $ mkName "Word8")) (conT $ mkName "BV”)) HTH, Bertram