mlabs-haskell / mlabs-haskell/lambda-buffers

Parsing Stack Enhancements

Open
#120 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement frontend
Dominant language
Haskell
Stars
32
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This issue collects some internal discussion regarding possible improvements to the parsing stack.

Slack discussion identified the following tasks (discussion has been summarized):

  1. Iterate on syntax in the current parsing stack, so we can settle on something aesthethicaly pleasing for users.

    For example:

    • remove sum/records/prod keywords and just rely on RHS to be uniquely parseable { record }, (prod), | sum |. This would be helpful for the issue identified here

    • special unit type syntax, MaybeInt = Maybe Int (which would now be prod MaybeInt = (Maybe Int))

    • standalone derive statements are a bit verbose (rather why not just derive Eq, Json, PlutusData)

  2. Update the formatter (I think that's basic stuff we need for automated code quality)

    • lbf format should be tested with a forall source. meaningOf lbf format source = meaningOf source,
  3. treesitter grammar to have highlighting and symbol extractions in GH and editors for .lbf. files (improvement of life)

  4. Align the parsing stack with something we fund robust and aligned with best practices (whilst making sure our error messages are amazing). Related issue comment

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current parsing stack and the discussion linked from PR #117. Then inspect the formatter entry point, including the lbf format behavior for forall sources, and the existing .lbf grammar support. Done would require an agreed syntax, formatter preservation tests, tree-sitter highlighting and symbol extraction, and improved error messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.