Skip to content

GHC panic: boxy_match_s

I get, in two different modules in the same 100+ module project (different dependency ordering by ghc --make for different executables):

ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.4 for powerpc-unknown-linux):
        boxy_match_s

I found boxy_match_s as auxiliary function of boxyMatchTypes in compiler/typecheck/TcUnify.lhs, but, using

find . -type f | xargs grep -n boxyMatchTypes /dev/null

, could not even find a call site of boxyMatchTypes!

The LANGUAGE pragmas of the two modules:

{-# LANGUAGE DeriveDataTypeable, FlexibleContexts,
    MultiParamTypeClasses, FlexibleInstances
    #-}

{-# LANGUAGE ScopedTypeVariables,
    MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances
    #-}

(I do not consciously use impredicative types anywhere.)

This occurred after I added additional type parameters (without fundeps) to intermediate type classes (with other fundeps) in larger class hierarchies, and performed lots of related changes.

(make clean does not help.)

Hoping that just the knowledge that this can happen leads to a fix...

Wolfram

Trac metadata
Trac field Value
Version 6.10.4
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