haskellfoundation / haskellfoundation/haskell-2010-revised-report

Compiler Pragmas

Open
#62 2 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 Haskell 2010 report currently specifies the following compiler pragmas: `INLINE`, `NOINLINE`, `SPECIALIZE`, `LANGUAGE`.

I propose to add the following list of pragmas, since they help write the API specification of the report: `DEPRECATED`, `MINIMAL`. Potentially we could also add `WARNING`, but that one is a bit more complicated because we would have to discuss whether to include warning groups in the specification.

Also, I would like to remove the following section from the specification of the `LANGUAGE` pragma:

```
Those implementations are also encouraged to support the following named language features:
PatternGuards, NoNPlusKPatterns, RelaxedPolyRec,
EmptyDataDecls, ForeignFunctionInterface

These are the named language extensions supported by some pre-Haskell 2010 implementations, that have been integrated into this report.
```

This is both a GHC-ism, because (only?) GHC implemented these language extensions in that form, and because I don't think we want to forever bake Haskell98 compatibility into the report.

Contributor guide

Open the contributing guide

Research direction

Locate the Haskell 2010 report section that specifies compiler pragmas and the `LANGUAGE` pragma. Compare its current lists with the requested additions and removals, then determine how the optional `WARNING` discussion should be scoped; done means the report reflects the agreed pragma specification without the legacy language-extension wording.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.