haskellfoundation / haskellfoundation/haskell-2010-revised-report

Change definition of BNF production `funlhs` to allow additional parentheses

Open Beginner friendly
#5 0 comments 0 reactions 0 assignees View on GitHub
feature: language report
Dominant language
Typst
Stars
20
Forks
5
Avg merge
4d 18h
Merged PRs (30d)
6

Description

GHC deviates from the report in how it implements the `funlhs` production in the grammar. This is documented here: https://downloads.haskell.org/ghc/latest/docs/users_guide/bugs.html#lexical-syntax

> GHC allows redundant parantheses around the function name in the funlhs part of declarations. That is GHC will succeed in parsing a declaration like ((f)) x = for any number of parantheses around f.

Contributor guide

Open the contributing guide

Research direction

Start with the report's BNF definition of the `funlhs` production and compare it with the linked GHC lexical-syntax documentation. Update the production so declarations such as `((f)) x = ` are accepted with any number of redundant parentheses, and verify that the report matches the documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.