Skip to content

ghc-8.0.1: panic! (the 'impossible' happened) filterImports/combine (double import)

It's a distilled example or repa-devil-0.3.2.6 build failure:

-- Cursored.hs:
{-# LANGUAGE TypeFamilies #-}
module Cursored where

class Source r where
    data Array r

instance Source () where
    data Array () = F { f :: Int }
-- Bug.hs:
module DevIL () where

import Cursored (Array(..), Source(..))
[1 of 2] Compiling Cursored         ( Cursored.hs, Cursored.o )
[2 of 2] Compiling DevIL            ( Bug.hs, Bug.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-unknown-linux):
        filterImports/combine
  (Array, Array{Array, F, f}, Nothing)
  (Array, Source{Source, Array}, Nothing)

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

The error is the same as #11959 (closed) but involved entities are slightly different.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information