Open adamflott opened 7 years ago
Interesting. I did not know this is valid Haskell. Where is a specification for this grammar production?
I just tried and I do not get the error. Can you update to latest version and check again?
Reopen if you are able to reproduce the issue.
Updated. Still getting the error but that may be due to using spacemacs / intero. The version used is: "16.2-git".
Interesting.
I just opened this in spacemacs, the straight flycheck says it is fine, loading it into inf-haskell mode works fine.
Can't comment on intero, I have not used it.
What version of compiler are you using?
@adamflott: Can you restart Emacs?
@alanz 8.0.2 with stackage lts 8.0
@gracjan I did (after upgrading all the packages)
I still cannot reproduce the error. Is it after pressing TAB? When does it happen?
@gracjan not after tab. I cleaned my spacemacs dirs (git clean -f -d -x; git branch has me on release-0.200), removed my intero spacemacs glue that's been upstreamed to spacemacs haskell (https://github.com/cydparser/spacemacs-intero) layer, did a intero-restart
and still get the error: http://imgur.com/a/1b6kE .
I am sure that code is using DatatypeContexts, which has been deprecated?
@adamflott: Is this a tooltip? I've never seen such a tool tip. Do you have a Haskell linter enabled?
@gracjan yes it is a tooltip. I'm assuming its a part of spacemacs. My .spacemacs has
dotspacemacs-configuration-layers
'((haskell :variables haskell-completion-backend 'intero)
)
I don't have any other linters in use.
This looks like a problem that is outside of haskell-mode and related to flycheck. Specifically flycheck uses ghc
executable available in PATH
to check syntax of Haskell source code. Probably you have old version of ghc
in your PATH
that does not match your stack.yml
setup.
Can you check if you have a ghc
in your PATH
and remove it from there temporarily? That would confirm that flycheck is the culprit here.
Removed all traces of ghc from my system install so only stack remains. Still showing the parse error.
Relevant lines from my emacs messages buffer:
(Spacemacs) Warning: package flycheck not initialized in layer intero, you may consider removing this package from the package list or use the :toggle keyword instead of a `when' form.
(Spacemacs) Warning: More than one init function found for package intero. Previous owner was haskell, replacing it with layer intero.
...
Booting up intero ...
Booted up intero!
...
Disabling interactive-haskell-mode ...
I can try this experiment at home on my Arch Linux install. This one is from my Ubuntu 14.04 install with a custom emacs.
Parse error on valid syntax. Given,
haskell-mode is telling me there is parse error at the
{
Snippet from http://stackoverflow.com/questions/21505975/write-gadt-record-with-constrained-type