Skip to content

haskell-definition-face not used when as-pattern precedes infix function definition #450

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

Closed
eigengrau opened this issue Jan 23, 2015 · 4 comments

Comments

@eigengrau
Copy link
Contributor

When a function is defined in infix syntax, haskell-definition-face applies to the function name. So in the following, op will bear the definition face.

foo `op` bar = undefined

However, haskell-definition-face will fail to be assigned when an as-pattern precedes the function name. So, op below receives haskell-operator-face.

foo@Nothing `op` bar = undefined
@gracjan
Copy link
Contributor

gracjan commented Jan 26, 2015

Ugh, this one is real tough, if we complicate a little:

foo@RadomRecord { withFields = (_,Just assignAVar) } `op` bar

going over the part after @ needs more than a regexp. I'm guessing it is doable in Emacs, but current haskell-font-lock.el does not allow for an easy way of doing it.

@gracjan
Copy link
Contributor

gracjan commented Oct 16, 2015

Not only tokenizer, full parser is needed. The one from haskell-indentation could be retroffieted to do what we need.

@gracjan
Copy link
Contributor

gracjan commented Jan 31, 2016

See also #1122.

@gracjan
Copy link
Contributor

gracjan commented Jul 19, 2016

No semantic therefore no fix for this one.

@gracjan gracjan closed this as completed Jul 19, 2016
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

2 participants