#5829: break003 fails with a DEBUG compiler
---------------------------------+------------------------------------------
    Reporter:  igloo             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:  7.6.1           
   Component:  Compiler          |     Version:  7.4.1-rc2       
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:  break003        
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
 break003 fails with a DEBUG compiler:

 {{{
 $ cat Test3.hs
 mymap f [] = []
 mymap f (x:xs) = f x:mymap f xs

 main = mapM_ putStrLn $ mymap ('a':) ["hello","bye"]
 }}}

 {{{
 $ ghci Test3.hs
 GHCi, version 7.4.0.20120126: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 [1 of 1] Compiling Main             ( Test3.hs, interpreted )
 Ok, modules loaded: Main.
 *Main> :b 2
 Breakpoint 0 activated at Test3.hs:2:18-31
 *Main> main
 Stopped at Test3.hs:2:18-31
 _result :: [a] = _
 f :: t -> a = _
 x :: t = _
 xs :: [t] = [_]
 [Test3.hs:2:18-31] *Main> f
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 7.4.0.20120126 for x86_64-apple-darwin):
         ASSERT failed! file compiler/typecheck/TcEnv.lhs line 427
 ( it{v am5} [lid] :: ( t{tv Im0} [rt] :: ghc-prim:GHC.Prim.*{(w) tc 34d} )
                      -> ( a{tv Im1} [rt] :: ghc-prim:GHC.Prim.*{(w) tc
 34d} ) )
 ( t{tv Im0} [rt] :: ghc-prim:GHC.Prim.*{(w) tc 34d} )
 -> ( a{tv Im1} [rt] :: ghc-prim:GHC.Prim.*{(w) tc 34d} )

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

 [Test3.hs:2:18-31] *Main>
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5829>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to