Evan Laforge | 13 Sep 07:13 2012
Picon

http://hackage.haskell.org/trac/ghc/ticket/5252 not dead yet

So I have something that looks similar to
http://hackage.haskell.org/trac/ghc/ticket/5252, namely, given these
two modules:

% cat Midi.hs
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Midi (
    WriteMessage(..)
    , WriteDevice
    -- TODO due ghc bug: http://hackage.haskell.org/trac/ghc/ticket/5252
    -- , WriteDevice(WriteDevice)
) where
import qualified Data.ByteString as ByteString

data WriteMessage = WriteMessage !WriteDevice
newtype WriteDevice = WriteDevice ByteString.ByteString

% cat CoreMidi.hs
module CoreMidi where
import qualified Midi

write_message :: Midi.WriteMessage -> IO Bool
write_message (Midi.WriteMessage _) = return True

% ghc -c Midi.hs
% ghc -c CoreMidi.hs
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.1 for x86_64-apple-darwin):
	reboxProduct: not a product main:Midi.WriteDevice{tc r2M}

(Continue reading)


Gmane