Ticket #2683 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

Boxy-type ASSERT failure in 6.10: panic in xmonad-contrib

Reported by: dons Owned by: simonpj
Priority: high Milestone: 7.0.1
Component: Compiler Version: 6.9
Keywords: Cc: dons@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: typecheck/should_compile/T2683 Blocked By:
Blocking: Related Tickets:

Description

Testing xmonad-contrib-0.8 with ghc 6.10 RC. Probably a release-blocking bug.

[ 35 of 138] Compiling XMonad.Layout.MultiToggle ( XMonad/Layout/MultiToggle.hs, dist/build/XMonad/Layout/MultiToggle.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 6.10.0.20081007 for x86_64-unknown-linux):
	ASSERT failed! file typecheck/TcUnify.lhs line 1000
a{tv aKF8} [box]

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

To reproduced, grab cabal-install 0.6 and:

cabal install xmonad-contrib-0.8

Change History

Changed 5 years ago by igloo

  • priority changed from normal to high
  • difficulty set to Unknown
  • milestone set to 6.10.1

You need a DEBUG compiler to reproduce this (so it may not be a regression, but we should take a look anyway):

{-# LANGUAGE ExistentialQuantification, MultiParamTypeClasses,
             FunctionalDependencies, Rank2Types #-}

module Q where

class Transformer t a | t -> a where
    transform :: t -> l a -> (forall l'. l' a -> b) -> b

data EL a = forall l. EL (l a)

unEL :: EL a -> (forall l. l a -> b) -> b
unEL = undefined

transform' :: (Transformer t a) => t -> EL a -> EL a
transform' = undefined

data MultiToggleS ts a = MultiToggleS ts

data MultiToggle = MultiToggle

expand :: HList ts a => MultiToggleS ts a -> MultiToggle
expand (MultiToggleS ts) =
    resolve ts
        (\x mt ->
            let g = transform' x in
            mt
        )
        MultiToggle

class HList c a where
    resolve :: c -> (forall t. (Transformer t a) => t -> b) -> b
$ ghc -fforce-recomp -c q.hs
ghc: panic! (the 'impossible' happened)
  (GHC version 6.11.20081010 for x86_64-unknown-linux):
        ASSERT failed! file typecheck/TcUnify.lhs line 1000 a{tv ahb} [box]

Line 1000 is the second ASSERT here:

unifyType :: TcTauType -> TcTauType -> TcM CoercionI
-- No boxes expected inside these types
-- Acutal and expected types
unifyType ty1 ty2       -- ty1 expected, ty2 inferred
  = ASSERT2( not (isBoxyTy ty1), ppr ty1 )
    ASSERT2( not (isBoxyTy ty2), ppr ty2 )
    addErrCtxtM (unifyCtxt ty1 ty2) $
    uTysOuter True ty1 True ty2

Changed 5 years ago by simonpj

The assertion is to do with "boxy types" which Dimitrios and I are about (well, over the next few months) to overhaul completely. Can you see if matters are ok without DEBUG on? I bet they will be, and the ASSERT is over-cautious. In which case, we'll let it ride for now.

Simon

Changed 5 years ago by simonpj

  • summary changed from Regression with 6.10: panic in xmonad-contrib to Boxy-type ASSERT failure in 6.10: panic in xmonad-contrib

Changed 5 years ago by dons

@simon

xmonad-contrib builds ok without the DEBUG compiler, so might be ok to let it ride.

Changed 5 years ago by igloo

  • priority changed from high to normal

Changed 5 years ago by simonmar

  • os changed from Linux to Unknown/Multiple
  • architecture changed from x86_64 (amd64) to Unknown/Multiple

almost certainly not arch/os specific

Changed 5 years ago by simonpj

  • owner set to simonpj
  • severity changed from critical to normal
  • milestone changed from 6.10.1 to 6.12 branch

OK changing to 6.12; I think 6.10 is fine.

Simon

Changed 3 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.3

Changed 3 years ago by igloo

  • priority changed from normal to low
  • milestone changed from 6.12.3 to 6.14.1

Changed 3 years ago by igloo

  • priority changed from low to high
  • failure set to None/Unknown

Let's check this is fixed after the typechecker branch is merged.

Changed 3 years ago by igloo

  • blockedby 4232 added

Changed 3 years ago by simonpj

  • status changed from new to infoneeded
  • testcase set to typecheck/should_compile/T2683

I believe this works with the new type checker, at lesat with Ian's cut-down case (which I have added as a regression test).

DonS: can you try with xmonad?

I'll move to 'infoneeded'.

Simon

Changed 3 years ago by igloo

  • blockedby 4232 removed

Changed 3 years ago by simonpj

  • cc dons@… added
  • status changed from infoneeded to closed
  • resolution set to fixed

No response from Don, so closing. The code that has the ASSERT is gone altogether.

Note: See TracTickets for help on using tickets.