vim2hs icon indicating copy to clipboard operation
vim2hs copied to clipboard

Infix operator definitions incorrectly highlighted

Open dag opened this issue 13 years ago • 2 comments

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 :.

dag avatar Oct 06 '12 20:10 dag

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.

danr avatar Aug 11 '13 20:08 danr

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.

dag avatar Aug 11 '13 20:08 dag