#4226: Lifting constraints is questionably correct for implicit parameters.
----------------------------------------+-----------------------------------
    Reporter:  dolio                    |        Owner:        
        Type:  bug                      |       Status:  new   
    Priority:  normal                   |    Milestone:        
   Component:  Compiler (Type checker)  |      Version:  6.12.1
    Keywords:  implicit parameters      |   Difficulty:        
          Os:  Linux                    |     Testcase:        
Architecture:  x86_64 (amd64)           |      Failure:  Other 
----------------------------------------+-----------------------------------
Changes (by ezyang):

 * cc: ezy...@… (added)


Comment:

 Some more interesting behavior:

 {{{
 Prelude> let ?p = 5 in (let ?p = 1 in ((\ () -> ?p + 1) :: (() -> ((?p ::
 Int) => Int)))) ()
 2
 Prelude> let ?p = 5 in (((let ?p = 1 in \ () -> ?p + 1) :: (() -> ((?p ::
 Int) => Int)))) ()
 6
 }}}

 As far as I can tell, we need to tell the type-checker about the higher-
 rank as close to the desired location as possible in order to see this
 behavior.

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