haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

Parsing SCC annotation with omitted quotes identifier #392

Open sighingnow opened 6 years ago

sighingnow commented 6 years ago

In {-# SCC #-} annotation, The double quotes can be omitted if name is a Haskell identifier. But current haskell-src-exts doesn't support this feature. As presented in tests/examples/Ppr048.hs, when quotes are omitted we get a parser error.

{-# SCC foo #-}
foo :: Int -> Int
foo x = x

Related issue: commercialhaskell/hindent#408.

mpickering commented 6 years ago

The more serious problem here is that top level SCC pragmas are not implemented yet.