Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,326
    • Issues 4,326
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 390
    • Merge Requests 390
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19192

Closed
Open
Opened Jan 08, 2021 by Vladislav Zavialov@int-indexDeveloper

Drop support for parentheses in GADT constructors

See user manual 6.4.7.1. Formal syntax for GADTs

Vlad is suggesting that we do not support parens, thus striking out the production

prefix_gadt_body ::= '(' prefix_gadt_body ')'

So you can't write

data T where
  T1 :: (Int -> T)
  T2 :: (forall a. a -> T)
  T3 :: forall a. (a -> T)
  T4 :: forall a. (a -> (T))

GHC currently allows all four, simply discarding the parens entirely, very early in parsing, specifically in splitLHsGadtTy.

Edited Jan 08, 2021 by Simon Peyton Jones
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#19192