Commit f7e4ca26 authored by simonpj's avatar simonpj

[project @ 2002-12-11 17:09:08 by simonpj]

Back out the function tycon kind change (big comment to explain why)
parent 63e510b5
......@@ -364,8 +364,14 @@ instance Binary Kind where
We define a few wired-in type constructors here to avoid module knots
\begin{code}
funTyCon = mkFunTyCon funTyConName (mkArrowKinds [openTypeKind, openTypeKind] liftedTypeKind)
-- Functions can take and return either lifted or unlifted types
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.
\end{code}
------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment