Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,842
    • Issues 4,842
    • 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
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17213

Closed
Open
Created Sep 19, 2019 by Krzysztof Gogolewski@monoidalDeveloper

Rank-n-types without -XRankNTypes

Consider two modules:

{-# LANGUAGE RankNTypes #-}
module X where

foo :: (forall a. a -> a) -> Int
foo = foo
module Y where
import X

g = foo

Note that Y does not use RankNTypes.

Currently, g is accepted. However, the inferred type of g is (forall a. a -> a) -> Int, which cannot be written. We should not allow a value if writing its type requires an additional extension.

Reporting on behalf of Simon PJ.

Edited Sep 19, 2019 by Krzysztof Gogolewski
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking