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

Infix operator definitions incorrectly highlighted #32

Open
dag opened this issue Oct 6, 2012 · 2 comments
Open

Infix operator definitions incorrectly highlighted #32

dag opened this issue Oct 6, 2012 · 2 comments
Labels

Comments

@dag
Copy link
Owner

dag commented Oct 6, 2012

f $ x = f x

Highlights as a function definition for f rather than $. Getting this right might be difficult, though:

map (x : xs) = ...

should highlight map rather than :.

@danr
Copy link
Contributor

danr commented Aug 11, 2013

If you decide to implement this, remember that this is also allowed:

(f . g) x = f (g x)

Extensions such as ViewPatterns and NPlusKPatterns could of course make this even trickier.

@dag
Copy link
Owner Author

dag commented Aug 11, 2013

Yeah. For the Big Rewrite I'm thinking of scrubbing this highlighting all together. There's too many edge cases and in fact = is not "function definition" in Haskell so trying to highlight it as such is doomed. For example you can do (a,b) = ... at the top level.

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

No branches or pull requests

2 participants