| 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