[GHC] #5691: Crash: strange interaction of ScopedTypeVariables extension with type class name resolution

GHC cvs-ghc at haskell.org
Thu Dec 15 18:36:52 CET 2011


#5691: Crash: strange interaction of ScopedTypeVariables extension with type class
name resolution
------------------------------------------+---------------------------------
  Reporter:  dominiquedevriese            |          Owner:                                   
      Type:  bug                          |         Status:  closed                           
  Priority:  normal                       |      Milestone:                                   
 Component:  Compiler (Type checker)      |        Version:  7.0.4                            
Resolution:  fixed                        |       Keywords:  ScopedTypeVariables, type classes
        Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple                 
   Failure:  Compile-time crash           |     Difficulty:  Unknown                          
  Testcase:  typecheck/should_fail/T5691  |      Blockedby:                                   
  Blocking:                               |        Related:                                   
------------------------------------------+---------------------------------
Changes (by simonpj):

  * status:  new => closed
  * difficulty:  => Unknown
  * resolution:  => fixed
  * testcase:  => typecheck/should_fail/T5691


Comment:

 Interesting!  Indeed with 7.0.3 I get
 {{{
 simonpj at cam-04-unx:~/tmp$ ghc-7.0.3 -c T5691.hs -dcore-lint
 *** Core Lint errors : in result of Desugar ***
 <no location info>:
     In the coercion `co_alI'
     co_alI is out of scope
 *** Offending Program ***
  ...snip...
 }}}
 But with HEAD I get
 {{{
 T5691.hs:15:24:
     Couldn't match type `p' with `PrintRuleInterp'
     Expected type: PrintRuleInterp a
       Actual type: p a
     In the first argument of `printRule_', namely `f'
     In the second argument of `($)', namely `printRule_ f'
     In the expression: MkPRI $ printRule_ f

 T5691.hs:24:10:
     No instance for (Monad RecDecParser)
       arising from the superclasses of an instance declaration
     Possible fix: add an instance declaration for (Monad RecDecParser)
     In the instance declaration for `MonadPlus RecDecParser'
 }}}
 both of which are correct.  Rather than investigate further, I'll mark
 this as fixed, but I'll add it to the test suite.

 Thanks

 simon

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



More information about the Glasgow-haskell-bugs mailing list