haskellfoundation / haskellfoundation/haskell-2010-revised-report

Syntax stolen by data kinds and type operators

Open
#61 3 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

The following is legal in Haskell2010 but not allowed by GHC's `Haskell2010`.
```haskell
one = \x -> x :: Int $ 1
```
This is because GHC tries to parse it as: `\x -> x :: (Int $ 1)` while the report says to parse this as `\x -> (x :: Int) $ 1`.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Haskell2010 syntax section that defines lambda expressions, type signatures, and the `$` type operator in the revised report. Compare its grammar with the example and verify that the report specifies `\x -> (x :: Int) $ 1`, rather than treating `Int $ 1` as the type; done means the documented grammar and example agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.