-
Notifications
You must be signed in to change notification settings - Fork 48
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
Keyword detected for tagged-union data
s only absent any record-syntax
#15
Comments
data
s but not record-syntax data
data
s only absent any record-syntax
This was actually an issue of how the end of a function definition is detected. |
Cool, that fixed it! Here's another minor quirk, but just for fun or in case you're obsessed about regexing deeper and deeper 🤣 Observe Ah well, not a big deal anyway, everyone knows one cannot derive-from a data-constructor ^_^ so feel free to ignore |
Also I suppose one could make a case for type-constructors appearing inside/next-to a data-constructor to be tagged, but again I suspect in regexing this might be a can-of-worms.. then again, just because regexes confuse me, doesn't mean the same holds for others :P |
Regexes and me are a love/hate relationship 😂. But I'll have a look at it maybe it's an easy one to fix. |
Yeah I imagine also Haskell's recursive and nested constructor possibilities are nightmarish to properly process in a regex even in a single line. Consider L62 above |
There is a command in vscode (Show TM Scopes) which shows you exactly all the scopes the current syntax item is tagged with 😉 . Btw its very nice of you to report these issues, but I'd much prefer if you weren't posting them in a closed issue. It'd be better to open a new one. You could even open a new one for each one, that's much better because I doubt I'll get around to fixing all of them soon and then they might just get lost. |
The nested constructors are less of a problem, because its often unnecessary to pay any attention to the nesting. Just tag everything that starts with an upper case letter and is not a type signature as a constructor. One thing which you may notice is that the |
Ah cool, will do from now on. Some people don't wanna see "zig" new issues in their mailbox all at once come Monday, but yeah from a tracking PoV individual issues are better |
Oh I don't like being spammed either, but I'd rather have a full inbox than have all those issues be lost because no one remembers where they were reported. |
Minor quirk really, but for the sake of completeness of open (non)"issues" 😁 In the screenshot below, observe:
at the bottom --- correct detection of
deriving
in keyword scope in the tagged-uniondata QueryData
that has no record-syntax, vs.at the top (and also in the
data Query
near the bottom) --- incorrect mis-detection ofderiving
in variable scope when record-syntax is present in thedata
My RegEx is super-rusty, maybe I'll try my hand here later today, but wanted to report for now ;)
The text was updated successfully, but these errors were encountered: