#4008: type error trying to specialize polymorphic function
-----------------------+----------------------------------------------------
    Reporter:  nr      |       Owner:                           
        Type:  bug     |      Status:  new                      
    Priority:  normal  |   Component:  Compiler (Type checker)  
     Version:  6.12.1  |    Keywords:                           
          Os:  Linux   |    Testcase:                           
Architecture:  x86     |     Failure:  GHC rejects valid program
       Patch:  0       |  
-----------------------+----------------------------------------------------
 The attached module won't compile---definition of 'wrap'
 is rejected.  The error message is
 {{{
 [ 1 of 13] Compiling Pain             ( Pain.hs, Pain.o )

 Pain.hs:18:7:
     Couldn't match expected type `n C O' against inferred type `C'
       Expected type: ExTriple (Counter n)
       Inferred type: ExTriple (->)
     In the expression: scalar
     In the definition of `wrap': wrap = scalar
 }}}
 The inferred type is alarming, and in any case the type of wrap is
 a straightforward specialization of the type of scalar.

 Could the problem be with liberal type synonyms?
 I don't think we're doing anything unreasonable...

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