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,309
    • Issues 4,309
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 383
    • Merge Requests 383
  • 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
  • #16275

Closed
Open
Opened Feb 01, 2019 by waldmann@imn.htwk-leipzig.de@trac-waldmann

type hole in hs-boot file triggers GHC internal error

Put each line in a separate file, the last one is B.hs-boot

module A where { import {-# SOURCE #-} B }

module B where { }

module B where { data T a ; foo :: T _ }

then

$ ghci A.hs 

GHCi, version 8.6.3: http://www.haskell.org/ghc/  :? for help
[1 of 3] Compiling B[boot]          ( B.hs-boot, interpreted )

B.hs-boot:1:38: error:
    • GHC internal error: ‘_’ is not in scope during type checking, but it passed the renamer
      tcl_env of environment: []
    • In the first argument of ‘T’, namely ‘_’
      In the type signature: foo :: T _
  |
1 | module B where { data T a ; foo :: T _ }
  |                                      ^

I know the program is invalid (the hole has no valid instance) but still it should not produce an internal error?

Trac metadata
Trac field Value
Version 8.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#16275