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,265
    • Issues 4,265
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 419
    • Merge Requests 419
  • 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
  • #5716

Closed
Open
Opened Dec 22, 2011 by dreixel@trac-dreixel

Failure when using promoted data family instances

The following code should fail (since we don't promote data families), but it should do so gracefully:

{-# LANGUAGE GADTs                      #-}
{-# LANGUAGE TypeFamilies               #-}
{-# LANGUAGE PolyKinds                  #-}

module Bug1 where


data family DF a 
data instance DF Int = DFInt

data U = U1 (DF Int)

data I :: U -> * where I1 :: I (U1 DFInt)

{-
    GHC internal error: `DFInt' is not in scope during type checking, but it passed the renamer
    tcl_env of environment: [(r9P, AThing U -> *), (r9Q, ANothing)]
    In the type `I (U1 DFInt)'
    In the definition of data constructor `I1'
    In the data type declaration for `I'
-}
Trac metadata
Trac field Value
Version 7.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC jpm@cs.uu.nl
Operating system
Architecture
Assignee
Assign to
7.4.2
Milestone
7.4.2
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#5716