Skip to content

Panic with recursion-schemes package and unit

Steps to reproduce:

  1. Install GHC 7.6.1 and recursion-schemes (http://hackage.haskell.org/package/recursion-schemes)
  2. Create a new .hs file with the following
import Data.Functor.Foldable

foo = embed ()
  1. Load the file into GHCI
  2. Evaluate foo
*Main> foo

<interactive>:162:1:
    Can't find interface-file declaration for variable foo
      Probable cause: bug in .hi-boot file, or inconsistent .hi file
      Use -ddump-if-trace to get an idea of which file caused the error
    In the expression: foo
    In an equation for `it': it = foo
*Main> :t foo

<interactive>:1:1:
    Can't find interface-file declaration for variable foo
      Probable cause: bug in .hi-boot file, or inconsistent .hi file
      Use -ddump-if-trace to get an idea of which file caused the error
    In the expression: foo
  1. Evaluate `embed ()' directly at the REPL
*Main> embed ()
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.1 for x86_64-unknown-linux):
	nameModule
<<details unavailable>>

System Information:

[andy@vanir ~]$ uname -a
Linux vanir 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:30:49 CEST 2012 x86_64 GNU/Linux
[andy@vanir ~]$ ls asdf.hi # the would-be .hi file
ls: cannot access asdf.hi: No such file or directory
Edited by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information