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

Parser: Improve style #7498

Open
4 tasks
Tracked by #7489
magnus-madsen opened this issue Mar 28, 2024 · 1 comment
Open
4 tasks
Tracked by #7489

Parser: Improve style #7498

magnus-madsen opened this issue Mar 28, 2024 · 1 comment

Comments

@magnus-madsen
Copy link
Member

magnus-madsen commented Mar 28, 2024

General:

  • Avoid or-patterns
  • Re-enable ignored tests

Weeder2:

  • Rework getDuplicates implementation.
  • Move string constants to fields at the top (e.g. "Debug.stringify")
@mlutze
Copy link
Member

mlutze commented Mar 31, 2024

May I request:

  • Avoid name shadowing
  • Use xyz0, xyzVal, xyz format, which is the standard for the front-end
def foo(abc: ABC): Validation[ABC] = abc match {
   case ABC(xyz0, qrs0) =>
     val xyzVal = visitXYZ(xyz0) // returns validation
     val qrs = visitQRS(qrs0) // returns non-validation
     mapN(xyzVal) {
       case xyz => ABC(xyz, qrs)
     }
}

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