Improve "parse error on input `$'" when TemplateHaskell PRAGMA not declared
Spent close to 1h chasing what possibly could go wrong here:
import Data.Binary
import Data.DeriveTH
data Test = Pass | Failed
$(derive makeBinary ''Test)
Until, stupid me, I realized that the TemplateHaskell PRAGMA was missing. Could this message be a bit more friendly pointing me to the real issue?
If fixing this is simple, you could give me a few pointers and I'll try to provide a patch even though my Haskell experience is a bit thin.