Re: [GHC] #4120: Iface type variable out of scope in cast

2010-08-13 Thread GHC
#4120: Iface type variable out of scope in cast
-+--
  Reporter:  benl|  Owner:  

  Type:  bug | Status:  closed  

  Priority:  high|  Milestone:  6.14.1  

 Component:  Compiler (Type checker) |Version:  6.13

Resolution:  fixed   |   Keywords:  

  Testcase:  indexed-types/should_compile/T4120  |  Blockedby:  

Difficulty:  | Os:  
Unknown/Multiple
  Blocking:  |   Architecture:  
Unknown/Multiple
   Failure:  Runtime performance bug |  
-+--
Changes (by simonpj):

  * testcase:  => indexed-types/should_compile/T4120


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4120: Iface type variable out of scope in cast

2010-06-14 Thread GHC
#4120: Iface type variable out of scope in cast
--+-
  Reporter:  benl |  Owner:  
  Type:  bug  | Status:  closed  
  Priority:  high |  Milestone:  6.14.1  
 Component:  Compiler (Type checker)  |Version:  6.13
Resolution:  fixed|   Keywords:  
Difficulty:   | Os:  Unknown/Multiple
  Testcase:   |   Architecture:  Unknown/Multiple
   Failure:  Runtime performance bug  |  
--+-
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Fixed by
 {{{
 Mon Jun 14 14:43:11 BST 2010  simo...@microsoft.com
   * Fix Trac #4120: generate a proper coercion when unifying forall types

   This was just a blatant omission, which hasn't come up before.
   Easily fixed, happily.

 M ./compiler/typecheck/TcUnify.lhs -3 +8
 }}}
 Simon

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4120: Iface type variable out of scope in cast

2010-06-13 Thread GHC
#4120: Iface type variable out of scope in cast
+---
Reporter:  benl |Owner: 
Type:  bug  |   Status:  new
Priority:  high |Milestone:  6.14.1 
   Component:  Compiler (Type checker)  |  Version:  6.13   
Keywords:   |   Difficulty: 
  Os:  Unknown/Multiple | Testcase: 
Architecture:  Unknown/Multiple |  Failure:  Runtime performance bug
+---
Changes (by igloo):

  * priority:  normal => high
  * milestone:  => 6.14.1


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #4120: Iface type variable out of scope in cast

2010-06-07 Thread GHC
#4120: Iface type variable out of scope in cast
-+--
Reporter:  benl  |   Owner: 
Type:  bug   |  Status:  new
Priority:  normal|   Component:  Compiler (Type checker)
 Version:  6.13  |Keywords: 
  Os:  Unknown/Multiple  |Testcase: 
Architecture:  Unknown/Multiple  | Failure:  Runtime performance bug
-+--
 Compiling the following module against vector-0.6 or 0.7:

 {{{
 module Thing where
 import Data.Vector.Unboxed
 import Data.Vector.Unboxed.Mutable  as MV

 thing :: Vector Int
 thing = create (MV.new 5)
 }}}

 Complains about:
 {{{
 desire:tmp benl$ ghc -O -c -fglasgow-exts Thing.hs -fforce-recomp
 /Users/benl/.cabal/lib/vector-0.7/ghc-6.13.20100607/Data/Vector/Unboxed.hi
 Declaration for create
 Unfolding of Data.Vector.Unboxed.create:
   Iface type variable out of scope:  s
 }}}

 Looking in the interface file we have:
 {{{
   create :: forall a.
 Data.Vector.Unboxed.Base.Unbox a =>
 (forall s. GHC.ST.ST s (Data.Vector.Unboxed.Base.MVector s a))
 -> Data.Vector.Unboxed.Base.Vector a
 {- Arity: 2, Strictness: U(SA)C(U(LL)),
Inline: INLINE (sat-args=0),
Unfolding: InlineRule (1, False, False)
   (\ @ a
  $dUnbox :: Data.Vector.Unboxed.Base.Unbox a
  eta :: forall s.
 GHC.ST.ST
 s
 (Data.Vector.Generic.Base.Mutable
  Data.Vector.Unboxed.Base.Vector s a)
 ->
Data.Vector.Generic.new
  @ Data.Vector.Unboxed.Base.Vector
  @ a
  (Data.Vector.Unboxed.Base.$p1Unbox @ a $dUnbox)
  (Data.Vector.Generic.New.New
 @ Data.Vector.Unboxed.Base.Vector
 @ a
 eta))
 `cast`
   (forall a.
Data.Vector.Unboxed.Base.Unbox a =>
GHC.ST.ST s
 (Data.Vector.Unboxed.Base.TFCo:R:MutableVector s a)
-> Data.Vector.Unboxed.Base.Vector a) -}
 }}}

 The variable `s` in the right of the cast is indeed not in scope.

 This prevents `create` being inlined into client modules, which kills
 performance for benchmarks that create lots of small vectors (like a
 version of quickhull in DPH).

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs