#4272: Typechecker loop with type families
--------------------------------------------------+-------------------------
  Reporter:  NickSmallbone                        |          Owner:             
   
      Type:  bug                                  |         Status:  closed     
   
  Priority:  normal                               |      Milestone:             
   
 Component:  Compiler (Type checker)              |        Version:  6.13       
   
Resolution:  fixed                                |       Keywords:             
   
  Testcase:  indexed-types/should_fail/Ttttt4272  |      Blockedby:             
   
Difficulty:                                       |             Os:  Linux      
   
  Blocking:                                       |   Architecture:  x86_64 
(amd64)
   Failure:  Compile-time crash                   |  
--------------------------------------------------+-------------------------
Changes (by simonpj):

  * status:  new => closed
  * testcase:  => indexed-types/should_fail/Ttttt4272
  * resolution:  => fixed


Comment:

 The new type checker is coming to life.  I've just tried it on your
 program.  Sure enough, it tickled a couple of easily-fixed bugs (thank
 you) but once those were done it produced a decent error message in a
 jiffy:
 {{{
 T4272.hs:11:26:
     Occurs check: cannot construct the infinite type:
       a = TermFamily a a
     In the first argument of `terms', namely
         `(undefined :: TermFamily a a)'
     In the second argument of `prune', namely
         `(terms (undefined :: TermFamily a a))'
     In the expression: prune t (terms (undefined :: TermFamily a a))
 }}}
 So I declare this bug fixed. I've added a regression test, so you are
 imortalised.

 Simon

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