Re: Yet another External Core bug

2003-02-04 Thread Kirsten Chevalier
On Fri, Jan 24, 2003 at 01:31:46PM -, Simon Peyton-Jones wrote:
 In short, it's really a bug, but not a particularly easy one to fix.
 Rumination required.  But it probably only happens on a few programs,
 right?
 

It happens on at least two of the nofib benchmarks, so it seems to be
pretty significant. I didn't understand your explanation of the problem, so
unfortunately I can't suggest any solution.

Did the other Core bug I reported at the same time
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2003-January/002877.html
ever get fixed?

Thanks,
Kirsten

-- 
Kirsten Chevalier * [EMAIL PROTECTED] * Often in error, never in doubt
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



RE: Yet another External Core bug

2003-01-24 Thread Simon Peyton-Jones
| The attached file (generated by running ghc -fext-core on the Fibheaps
| benchmark from the nofib suite) fails to typecheck:
| 
| $ ghc -dcore-lint Fibheaps.hcr
| 
| Couldn't match `#' against `*'
| Expected kind: #
| Inferred kind: *
| When checking kinds in `GHC.Prim.(-) (GHC.Prim.State# s)'

I've found what's going on here.  Here is the comment from the
definition of the type constructor for (-):

funTyCon = mkFunTyCon funTyConName 
(mkArrowKinds [liftedTypeKind, liftedTypeKind]
liftedTypeKind)
-- You might think that (-) should have type (? - ? - *), and
you'd be right
-- But if we do that we get kind errors when saying
--  instance Control.Arrow (-)
-- becuase the expected kind is (*-*-*).  The trouble is that
the
-- expected/actual stuff in the unifier does not go
contra-variant, whereas
-- the kind sub-typing does.  Sigh.  It really only matters if
you use (-) in
-- a prefix way, thus:  (-) Int# Int#.  And this is unusual.


In short, it's really a bug, but not a particularly easy one to fix.
Rumination required.  But it probably only happens on a few programs,
right?

S
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs