#3692: TcTyFuns.flattenType: unexpected PredType
-------------------------------+--------------------------------------------
    Reporter:  cdfh            |       Owner:                         
        Type:  bug             |      Status:  new                    
    Priority:  normal          |   Component:  Compiler               
     Version:  6.10.4          |    Keywords:  TcTyFuns PredType panic
          Os:  Linux           |    Testcase:                         
Architecture:  x86_64 (amd64)  |     Failure:  Compile-time crash     
-------------------------------+--------------------------------------------
 Hello,

 I've found a bug, however it may be a duplicate of one of these: #2846,
 #3272, #3592, #3125, #3102 (roughly in order of duplicate-likelihoodness).

 Here's the code:

 {{{
 type Foo a b = () -> (Bar a => a)

 class Bar a where {}

 foo :: Foo a b
 foo = id (undefined :: Foo a b)
 }}}

 And the result of compilation:

 {{{
 $ ghc -fglasgow-exts --make Bug.hs

 [1 of 1] Compiling Bug              ( Bug.hs, Bug.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 6.10.4 for x86_64-unknown-linux):
   TcTyFuns.flattenType: unexpected PredType

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

 I'm running Gentoo Linux, with dev-lang/ghc-6.10.4 (not dev-haskell
 /haskell-platform)

 {{{
 Linux geneva 2.6.29-gentoo-r5 #1 SMP Sun Jul 12 03:16:58 BST 2009 x86_64
 Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz GenuineIntel GNU/Linux
 }}}

 I'm afraid I've not tested this against HEAD, since I couldn't get it to
 build.

 Note that `foo = undefined :: Foo a b` does not cause GHC to panic.

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