Parse error when annotating the "[]" type using "ANN type"
Summary
Using {-# ANN type [] NoSpecConstr #-}
or {-# ANN type ([]) NoSpecConstr #-}
results in a parse error. There seems to be no way to annotate such types. I worked it around using:
{-# ANN type List NoSpecConstr #-}
newtype List a = List {getList :: [a]}
Steps to reproduce
Use {-# ANN type [] NoSpecConstr #-}
in a program.
Expected behavior
There should be some way to allow ANN pragma on []
. Maybe I am not using it correctly, but I could not find relevant documentation in the user guide.
Environment
- GHC version used: 8.8.3