|
RE: Yet another External Core bug: msg#00060lang.haskell.glasgow.bugs
| 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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Invalid binding names in generated Core code, Simon Peyton-Jones |
|---|---|
| Next by Date: | RE: evaluation fault in ghci., Simon Marlow |
| Previous by Thread: | Yet another External Core bug, Kirsten Chevalier |
| Next by Thread: | RE: Template Haskell Crash, Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |