#3651: GADT type checking too liberal
----------------------------------------+-----------------------------------
    Reporter:  MartijnVanSteenbergen    |        Owner:              
        Type:  bug                      |       Status:  new         
    Priority:  normal                   |    Milestone:  7.0.1       
   Component:  Compiler (Type checker)  |      Version:  6.10.4      
    Keywords:                           |     Testcase:              
   Blockedby:                           |   Difficulty:              
          Os:  Unknown/Multiple         |     Blocking:              
Architecture:  Unknown/Multiple         |      Failure:  None/Unknown
----------------------------------------+-----------------------------------
Changes (by michalt):

 * cc: michal.terep...@… (added)


Comment:

 Seems like the new type checker fixes the bug:

   * for `unsafe1`:

     {{{
     Inaccessible code in
       a pattern with constructor `U', in an equation for `unsafe1'
     Couldn't match type `()' with `Bool'
     In the pattern: U
     In an equation for `unsafe1': unsafe1 B U = ()
     }}}

   * for `unsafe2`:

      {{{
      Inaccessible code in
        a pattern with constructor `U', in an equation for `unsafe2'
      Couldn't match type `()' with `Bool'
      In the pattern: U
      In an equation for `unsafe2': unsafe2 B U = ()
      }}}

   * for `unsafe3`:

      {{{
      Inaccessible code in
        a pattern with constructor `U', in an equation for `unsafe3'
      Couldn't match type `()' with `Bool'
      In the pattern: U
      In an equation for `unsafe3': unsafe3 B U = True
      }}}

 {{{
 ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.1.20101008
 }}}

 Not sure whether we should create a new test for this ticket, so I'm
 leaving it open.

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