JPMoresmau/BuildWrapper — pull request #11 by Oblosys (2012-08-01 16:13:55+00:00)
Title: ignore errors on getOutline

It turns out that haskell-src-exts is not working as expected. Modules with DoRec and TemplateHaskell cannot be parsed (and maybe other extensions cause problems as well.) The -XDoRec option is especially problematic, since there is no DoRec constructor in Language.Haskell.Exts.Extension.Extension. The method of stripping the -X will therefore not work.

But even putting the required extensions in language pragmas did not work. Whatever I tried, I could not get src-exts to parse this file:

```haskell
{-# LANGUAGE DoRec #-}
module Main where
parseProblem1 :: IO ()
parseProblem1 =
do { rec { () <- return ()
}
; return ()
}
```

For problematic modules, the outline will be missing, but there will also be a parse error that is only briefly visible (until ghc has type checked). This causes flashing squigglies, and sometimes a stuck squiggly on a folder.

I propose that we simply ignore the output from src-exts, so at least the errors disappear.