haskell / stylish-haskell

Haskell code prettifier
Other
987 stars 151 forks source link

Incorrectly identifies CPP as TemplateHaskell #140

Open ivan-m opened 7 years ago

ivan-m commented 7 years ago

This is probably a fault of haskell-src-exts, but I have some CPP macros that I use to help implement some repetitive instances.

However, stylish-haskell fails to parse this with:

Language.Haskell.Stylish.Parse.parseModule: could not parse Theseus/Values.hs: ParseFailed (SrcLoc "<unknown>.hs" 76 1) "TemplateHaskell language extension is not enabled. Please add {-# LANGUAGE TemplateHaskell #-} pragma at the top of your module."
neongreen commented 7 years ago

This might be related: https://github.com/jaspervdj/stylish-haskell/issues/51#issuecomment-30278481.