Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#2162 closed bug (duplicate)

panic! (the 'impossible' happened) while compiling XMonadContrib

Reported by: ivant Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

I was rebuilding XMonadContrib without doing Cabal clean first. I got the "panic!" message. The problem was persistent: if I started Cabal build again, I was getting the same message. After I did Cabal clean followed by Cabal build, the problem disappeared. Seem to be a problem with interacting with previously compiled code.

Here is the output of GHC:

[108 of 117] Compiling XMonad.Config.Sjanssen ( XMonad/Config/Sjanssen.hs, dist/build/XMonad/Config/Sjanssen.o )
ghc-6.8.2: panic! (the 'impossible' happened)
  (GHC version 6.8.2 for i386-unknown-linux):
	bind_args
    xmonad-0.6:XMonad.Core.:DLayoutClass{d r19g}
    [tpl_B2{v} [lid], tpl_B3{v} [lid], tpl_B4{v} [lid],
     tpl_B5{v} [lid], tpl_B6{v} [lid], tpl_B7{v} [lid], tpl_B8{v} [lid],
     tpl_B9{v} [lid]]
    [TYPE xmonad-contrib-0.6:XMonad.Layout.HintedTile.HintedTile{tc r19zx},
     TYPE X11-1.4.1:Graphics.X11.Types.Window{tc r5},
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.$f4{v r19zw} [gid]
       @ base:GHC.Word.Word32{tc 333},
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.doLayout{v r19zv} [gid],
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.$dmpureLayout{v r19zu} [gid],
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.a1{v r19zt} [gid]
     `cast` (base:GHC.Prim.right{(w) tc 34E}
               (base:GHC.Prim.inst{(w) tc 34H}
                  (base:GHC.Prim.inst{(w) tc 34H}
                     (base:GHC.Prim.trans{(w) tc 34y}
                        (forall (layout{tv i28Jn} [tv] :: base:GHC.Prim.*{(w) tc 34d}
                                                          -> base:GHC.Prim.*{(w) tc 34d})
                                a{tv i28Jo} [tv].
                         (xmonad-0.6:XMonad.Core.LayoutClass{tc rzi}
                            layout{tv i28Jn} [tv] a{tv i28Jo} [tv]) =>
                         layout{tv i28Jn} [tv] a{tv i28Jo} [tv]
                         -> X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD}
                         -> xmonad-0.6:XMonad.Core.XConf{tc rz}
                         -> xmonad-0.6:XMonad.Core.XState{tc ry}
                         -> base:GHC.Prim.sym{(w) tc 34v}
                              ((base:GHC.IOBase.:CoIO{tc rx})
                                 (([(a{tv i28Jo} [tv],
                                     X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD})],
                                   base:Data.Maybe.Maybe{tc rB}
                                     (layout{tv i28Jn} [tv] a{tv i28Jo} [tv])),
                                  xmonad-0.6:XMonad.Core.XState{tc ry})))
                        (forall (layout{tv i28Jp} [tv] :: base:GHC.Prim.*{(w) tc 34d}
                                                          -> base:GHC.Prim.*{(w) tc 34d})
                                a{tv i28Jq} [tv].
                         (xmonad-0.6:XMonad.Core.LayoutClass{tc rzi}
                            layout{tv i28Jp} [tv] a{tv i28Jq} [tv]) =>
                         layout{tv i28Jp} [tv] a{tv i28Jq} [tv]
                         -> X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD}
                         -> base:GHC.Prim.right{(w) tc 34E}
                              (base:GHC.Prim.inst{(w) tc 34H}
                                 (base:GHC.Prim.trans{(w) tc 34y}
                                    (forall a1{tv i28Jr} [tv].
                                     a1{tv i28Jr} [tv]
                                     -> base:GHC.Prim.trans{(w) tc 34y}
                                          (xmonad-0.6:XMonad.Core.XConf{tc rz}
                                           -> base:GHC.Prim.sym{(w) tc 34v}
                                                ((mtl-1.1.0.0:Control.Monad.State.Lazy.:CoStateT{tc ru})
                                                   xmonad-0.6:XMonad.Core.XState{tc ry}
                                                   <nt>base:GHC.IOBase.IO{tc 32I}
                                                   a1{tv i28Jr} [tv]))
                                          (base:GHC.Prim.sym{(w) tc 34v}
                                             ((mtl-1.1.0.0:Control.Monad.Reader.:CoReaderT{tc rt})
                                                xmonad-0.6:XMonad.Core.XConf{tc rz}
                                                (<nt>mtl-1.1.0.0:Control.Monad.State.Lazy.StateT{tc rv}
                                                   xmonad-0.6:XMonad.Core.XState{tc ry}
                                                   <nt>base:GHC.IOBase.IO{tc 32I})
                                                a1{tv i28Jr} [tv])))
                                    (forall a1{tv i28Js} [tv].
                                     a1{tv i28Js} [tv]
                                     -> base:GHC.Prim.sym{(w) tc 34v}
                                          (xmonad-0.6:XMonad.Core.:CoX{tc rs}) a1{tv i28Js} [tv]))
                                 ([(a{tv i28Jq} [tv],
                                    X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD})],
                                  base:Data.Maybe.Maybe{tc rB}
                                    (layout{tv i28Jp} [tv] a{tv i28Jq} [tv])))))
                     xmonad-contrib-0.6:XMonad.Layout.HintedTile.HintedTile{tc r19zx})
                  X11-1.4.1:Graphics.X11.Types.Window{tc r5})
             :: <pred>xmonad-contrib-0.6:XMonad.Layout.HintedTile.HintedTile{tc r19zx}
                        X11-1.4.1:Graphics.X11.Types.Window{tc r5}
                      -> X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD}
                      -> xmonad-0.6:XMonad.Core.XConf{tc rz}
                      -> xmonad-0.6:XMonad.Core.XState{tc ry}
                      -> base:GHC.Prim.State#{(w) tc 32q}
                           base:GHC.Prim.RealWorld{(w) tc 31E}
                      -> (# base:GHC.Prim.State#{(w) tc 32q}
                              base:GHC.Prim.RealWorld{(w) tc 31E},
                            (([(X11-1.4.1:Graphics.X11.Types.Window{tc r5},
                                X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD})],
                              base:Data.Maybe.Maybe{tc rB}
                                (xmonad-contrib-0.6:XMonad.Layout.HintedTile.HintedTile{tc r19zx}
                                   X11-1.4.1:Graphics.X11.Types.Window{tc r5})),
                             xmonad-0.6:XMonad.Core.XState{tc ry}) #)
                        ~
                      xmonad-contrib-0.6:XMonad.Layout.HintedTile.HintedTile{tc r19zx}
                        X11-1.4.1:Graphics.X11.Types.Window{tc r5}
                      -> X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD}
                      -> <nt>xmonad-0.6:XMonad.Core.X{tc rD}
                           ([(X11-1.4.1:Graphics.X11.Types.Window{tc r5},
                              X11-1.4.1:Graphics.X11.Xlib.Types.Rectangle{tc ruD})],
                            base:Data.Maybe.Maybe{tc rB}
                              (xmonad-contrib-0.6:XMonad.Layout.HintedTile.HintedTile{tc r19zx}
                                 X11-1.4.1:Graphics.X11.Types.Window{tc r5}))),
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.$dmhandleMessage{v r19zs} [gid],
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.pureMessage{v r19zr} [gid],
     xmonad-contrib-0.6:XMonad.Layout.HintedTile.description{v r19zq} [gid]]
    scrut: xmonad-contrib-0.6:XMonad.Layout.HintedTile.$f1{v r19yR} [gid]

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

Sjanssen.hs is

{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module XMonad.Config.Sjanssen (sjanssenConfig) where

import XMonad hiding (Tall(..))
import qualified XMonad.StackSet as W
import XMonad.Actions.CopyWindow
import XMonad.Layout.Tabbed
import XMonad.Layout.HintedTile
import XMonad.Config (defaultConfig)
import XMonad.Layout.NoBorders
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Prompt
import XMonad.Prompt.Shell
import XMonad.Util.Run (spawnPipe)
import XMonad.Layout.DwmStyle

import qualified Data.Map as M
import System.IO (hPutStrLn)

sjanssenConfig = do
    xmobar <- spawnPipe "xmobar"
    return $ defaultConfig
        { terminal = "urxvtc"
        , workspaces = ["irc", "web"] ++ map show [3 .. 7 :: Int] ++ ["mail", "im"]
        , logHook = dynamicLogWithPP $ sjanssenPP { ppOutput = hPutStrLn xmobar }
        , modMask = mod4Mask
        , mouseBindings = \(XConfig {modMask = modm}) -> M.fromList $
                [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w))
                , ((modm, button2), (\w -> focus w >> windows W.swapMaster))
                , ((modm.|. shiftMask, button1), (\w -> focus w >> mouseResizeWindow w)) ]
        , keys = \c -> mykeys c `M.union` keys defaultConfig c
        , layoutHook = dwmStyle shrinkText myTheme $ avoidStruts $ smartBorders (tiled Tall ||| tiled Wide ||| Full ||| tabbed shrinkText myTheme)
        , manageHook = manageHook defaultConfig <+> manageDocks
        }
 where
    tiled   = HintedTile 1 0.03 0.5

    mykeys (XConfig {modMask = modm, workspaces = ws}) = M.fromList $
        [((modm,               xK_p     ), shellPrompt myPromptConfig)
        ,((modm .|. shiftMask, xK_c     ), kill1)
        ,((modm .|. shiftMask .|. controlMask, xK_c     ), kill)
        ,((modm .|. shiftMask, xK_0     ), windows $ \w -> foldr copy w ws)
        ,((modm,               xK_b     ), sendMessage ToggleStruts)
        ]

    myFont = "xft:Bitstream Vera Sans Mono:pixelsize=10"
    myTheme = defaultTheme { fontName = myFont }
    myPromptConfig = defaultXPConfig
                        { position = Top
                        , font = myFont
                        , promptBorderWidth = 0 }

Change History (2)

comment:1 Changed 7 years ago by dons

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of issues relating to 1372, http://hackage.haskell.org/trac/ghc/ticket/1372

Now that xmonad as a library is stable, cabal not noticing it should clean after a darcs pull, and subsequent type, linker or runtime errors, is the most common source of user complaints about xmonad, fwiw.

comment:2 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.