#4310: Deferred equalities and forall types
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  6.12.3      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------
 In the new typechecker we occasionally find we want an equality
 {{{
 (forall a. F a beta) ~ (forall a. F a gamma)
 }}}
 where beta, gamma are unification variables that are (later) fixed from
 outside. As things stand we can't solve this, because our coercion form is
 too weak.  Once Brent is done, however, I think we will.  This ticket
 records the problem.

 It shows up in package `vector`:
  * `Data.Vector`, `Data.Vector.Unboxed`, `Data.Vector.Storable`,
 `Data.Vector.Primitive`: need to eta expand defn of `modify`.
  * `Data.Vector.Generic.New`: eta expand `create`

 A small example:
 {{{
 type function Mutable a :: * -> * -> *

 data New v a = New (forall s. ST s (Mutable v s a))

 create :: (forall s. ST s (Mutable v s a)) -> New v a
 create = New
 }}}

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