eta
eta copied to clipboard
Quasi-quote bug while building aeson-typescript
While building aeson-typescript-0.1.1.0
, I encountered a bug which may be related to Template Haskell.
[2 of 5] Compiling Data.Aeson.TypeScript.Instances
src/Data/Aeson/TypeScript/Instances.hs:76:28: error:
Illegal data constructor name: ‘:: ’
When splicing a TH expression:
Data.String.fromString (GHC.Show.showString "{[k: " ((GHC.Show.showString GHC.Base.. Data.String.Interpolate.Internal.Util.toString) (getTypeScriptType (Proxy :: Proxy a)) (GHC.Show.showString "]: " ((GHC.Show.showString GHC.Base.. Data.String.Interpolate.Internal.Util.toString) (getTypeScriptType (Proxy :: Proxy b)) (GHC.Show.showString "}" "")))))
In the quasi-quotation:
[i|{[k: #{getTypeScriptType (Proxy :: Proxy a)}]: #{getTypeScriptType (Proxy :: Proxy b)}}|]
|
76 | getTypeScriptType _ = [i|{[k: #{getTypeScriptType (Proxy :: Proxy a)}]: #{getTypeScriptType (Proxy :: Proxy b)}}|]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^