Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,867
    • Issues 4,867
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 457
    • Merge requests 457
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20865
Closed
Open
Created Dec 24, 2021 by Mario@blamario

The GADTs extension implies ExistentialQuantification

Summary

According to the User's Guide section on GADTs, the extension implies only MonoLocalBinds and GADTSyntax.

http://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/gadt.html

However the following short program compiles so it seems that ExistentialQuantification is also implied by GADTs:

{-# LANGUAGE GADTs #-}

module T16344 where

data T3 a = forall b. MkT3 (T3 b)

Proposed improvements or changes

I'm assuming this is an oversight in User's Guide, rather than a GHC bug. IMO it makes sense to require ExistentialQuantification: it's definitely allowed in GADT-style declarations, so why not in regular syntax as well?

In this case, the fix is trivial: just add the ExistentialQuantification to the two extensions already implied by GADTs.

Environment

  • GHC version used (if appropriate): 9.2.1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking