Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t parse “a-b”, whereas “a - b” is fine #88

Open
dato opened this issue Nov 22, 2014 · 2 comments
Open

Can’t parse “a-b”, whereas “a - b” is fine #88

dato opened this issue Nov 22, 2014 · 2 comments

Comments

@dato
Copy link

dato commented Nov 22, 2014

Hello! This might be a bug for HSE… but perhaps there’s an explanation or restriction that I’m missing.

Consider the following code:

module Foo where

test a b = a - b

This is correctly parsed:

% structured-haskell-mode check decl < foo.hs
% echo $?
0

However, if I change a - b to a-b (without surrounding spaces), I get:

% structured-haskell-mode check decl < foo.hs
structured-haskell-mode: Parse error: a-b

Any tips?

Many thanks in advance!

@chrisdone
Copy link
Member

No idea. :-)

@alanz
Copy link

alanz commented Nov 23, 2014

I suspect the parser is seeing "a-b" as an identifier or operator and it is invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants