Skip to content
GitLab
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 5,360
    • Issues 5,360
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #7536
Closed
Open
Issue created Dec 28, 2012 by Andrey Mokhov@snowleopardDeveloper

Panic with TypeFamilies with type synonym instances

The code below brings GHC to panic.

{-# LANGUAGE TypeFamilies, FlexibleInstances #-}

module Bug where

type Node v = Int

class Predicate a where
   type Var a
   variable :: Var a -> a

instance Predicate (Node v) where
   type Var (Node v) = v
   variable = undefined

Panic details:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.2 for i386-unknown-mingw32):
	tcTyVarDetails
    ( v{tv aa3} [tv] :: ghc-prim:GHC.Prim.*{(w) tc 34d} )

Can be reproduced on GHC versions 7.4.2 and 7.6.1.

Possibly, a duplicate of http://hackage.haskell.org/trac/ghc/ticket/7458, but difficult to tell without additional info on the latter.

Trac metadata
Trac field Value
Version 7.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC rotsor@gmail.com
Operating system
Architecture
Edited Mar 09, 2019 by rotsor
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking