[GHC] #5990: Malformed instance declaration produces panic

GHC cvs-ghc at haskell.org
Wed Apr 4 17:16:40 CEST 2012


#5990: Malformed instance declaration produces panic
--------------------------------+-------------------------------------------
 Reporter:  ChrisN              |          Owner:                                              
     Type:  bug                 |         Status:  new                                         
 Priority:  normal              |      Component:  Compiler (Parser)                           
  Version:  7.5                 |       Keywords:  malformed instance , pars, renamer, RnSource
       Os:  Unknown/Multiple    |   Architecture:  Unknown/Multiple                            
  Failure:  Compile-time crash  |       Testcase:                                              
Blockedby:                      |       Blocking:                                              
  Related:                      |  
--------------------------------+-------------------------------------------
 The following code produces a panic with 7.5:
 {{{
 module Test where

 class F a b where
         f ::  a b Int

 instance F -> b  where
         f _ = 1


 }}}

 whereas this code works as expected:


 {{{
 {-# LANGUAGE MultiParamTypeClasses , FlexibleInstances#-}
 module Test where

 class F a b where
         f ::  a b Int

 instance F (->) b  where
         f _ = 1

 }}}

 GHC 7.2.2 correctly identifies this as a malformed instance header.

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



More information about the Glasgow-haskell-bugs mailing list