Skip to content

Tracking: GHC's non-compliance with Haskell 2010 (GHC User's Guide §16.1) #93

Open

Description

@andreabedini

The GHC User's Guide has a section listing where GHC diverges from Haskell 2010 (§16.1). That's more or less the scope of this project, so here's a checklist mapping each entry to an issue or PR, or saying why I think nothing needs doing. Corrections welcome, especially on the "no change" ones.

16.1.1.1 Lexical syntax

16.1.1.2 Context-free syntax: both entries only apply to Haskell 98 mode. Nothing to do.

16.1.1.3 Expressions and patterns: GHC eta-expands and makes some programs more defined; -fpedantic-bottoms gives the report semantics back. I don't think the report should change.

16.1.1.4 Failable patterns: #56, #74 (MonadFail itself in #8, #79)

16.1.1.5 Recursive binding groups: I think this is already Haskell 2010. §4.5.1 ignores references to variables with a type signature, so the "identical contexts" rule in §4.5.2 only bites for variables bound by the same pattern binding, which is also what GHC does. The guide is comparing against Haskell 98. (The guide's example compiles with GHC 9.12.2 and -XHaskell2010.)

16.1.1.6 -main-is: a compiler flag, no change.

16.1.1.7 hs-boot files: #52

16.1.1.8 Numbers, basic types and built-in classes

16.1.1.9 Prelude: #92 (splitAt, derived Show for records, read of hex/octal, isAlpha, hGetContents)

16.1.1.10 FFI: no hs_init() after hs_exit() (GHC #13693). A GHC limitation, I'd leave the report alone.

16.1.2 Undefined and implementation-specific behaviour: tuple sizes are in #57. maxBound :: Char, Int width and overflow are implementation-defined anyway.

Activity

  1. BinderDavid commented on Oct 16, 2026

    @BinderDavid
    Collaborator

    W.r.t. 16.1.1.2 and 16.1.1.5: Once we are finished with this revised report I am going to propose to GHC to drop all comparisons to Haskell 98 in the user guide and only describe GHC's behaviour as compared to the revised report. I think those comparisons to Haskell 98 are more confusing than helpful, especially those that are related to RelaxedPolyRec (section 6.1.1.5). There are already very few people who know the precise difference between 98 and 2010, and no one uses Haskell 98 for writing code anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions