[GHC] #8462: Compiler crash on invalid type class instance

GHC ghc-devs at haskell.org
Sun Oct 20 06:42:51 UTC 2013


#8462: Compiler crash on invalid type class instance
-----------------------------------+---------------------------------------
       Reporter:  thomaseding      |             Owner:
           Type:  bug              |            Status:  new
       Priority:  normal           |         Milestone:
      Component:  Compiler         |           Version:  7.4.2
       Keywords:                   |  Operating System:  MacOS X
   Architecture:                   |   Type of failure:  Compile-time crash
  Unknown/Multiple                 |         Test Case:
     Difficulty:  Unknown          |          Blocking:
     Blocked By:                   |
Related Tickets:                   |
-----------------------------------+---------------------------------------
 If you try compiling the following code, the compiler crashes


 {{{
 class Foo a where
     foo :: a -> ()

 class Bar a where
     bar :: a -> ()

 instance (Foo a) => (Bar a -> ()) where
     bar = undefined

 }}}



 {{{
 *** Exception: compiler/rename/RnSource.lhs:430:14-81: Irrefutable pattern
 failed for pattern Data.Maybe.Just (inst_tyvars,
                                                         _,
                                                         SrcLoc.L _ cls,
                                                         _)

 }}}

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


More information about the ghc-tickets mailing list