#1513: odd panic with [()] >>> ()
-------------------------------+--------------------------------------------
  Reporter:  [EMAIL PROTECTED]  |          Owner:       
      Type:  bug               |         Status:  new  
  Priority:  normal            |      Milestone:       
 Component:  Compiler          |        Version:  6.6  
  Severity:  normal            |       Keywords:  panic
Difficulty:  Unknown           |             Os:  Linux
  Testcase:                    |   Architecture:  x86  
-------------------------------+--------------------------------------------
While messing around with arrows in GHCi, I was surprised to see the
 following (ill-typed) code cause a panic:

 {{{
    ___         ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
 / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
 \____/\/ /_/\____/|_|      Type :? for help.

 Loading package base ... linking ... done.
 Prelude> :m Control.Arrow
 Prelude Control.Arrow> [1, 2] >>> pure (+1)
 ghc-6.6: panic! (the 'impossible' happened)
   (GHC version 6.6 for i386-unknown-linux):
         nameModule it{v aIS}

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

 Further experimentation revealed that
 {{{
 [] >>> ()
 }}}
 is a type-error as expected, whereas
 {{{
 [()] >>> ()
 }}}
 causes a panic.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1513>
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