atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Pattern synonyms cause exceptions, breaking autocompletion & type inspection #130

Closed robrix closed 8 years ago

robrix commented 8 years ago

I have a module with PatternSynonyms enabled which exports, among other things, pattern AlignThis. This breaks haskell-ghc-mod:

h$HaskellException_msg: "fromParseResult: Parse failed at [<unknown>.hs] (4:11): Parse error: AlignThis"__proto__: h$HaskellExceptionmodule.exports.BufferInfo.parse @ /Users/rob/.atom/packages/haskell-ghc-mod/lib/completion-backend/buffer-info.coffee:63

As an effect of this, both autocompletion and type inspection are broken in this project.

lierdakil commented 8 years ago

Terribly sorry about long silence, this got completely lost in the pipes.

Type inspection shouldn't be affected at all, provided {-# LANGUAGE PatternSynonyms #-} pragma is present (ghc-mod doesn't do well with cabal-specified pragmas, regrettably)

I will investigate what could be done about autocompletion.

lierdakil commented 8 years ago

Should be fixed by v1.17.1. Sorry it took so long.

robrix commented 8 years ago

🙇 Thank you very much!

And no need to apologize. I’m very grateful for the time and effort you put into the atom-haskell suite!