Skip to content
Snippets Groups Projects
Commit 19c34632 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

[project @ 2000-07-14 13:38:55 by simonpj]

Fix typeKind
parent 6a562dd5
No related merge requests found
......@@ -782,13 +782,16 @@ typeKind (AppTy fun arg) = funResultTy (typeKind fun)
typeKind (FunTy arg res) = fix_up (typeKind res)
where
fix_up kind = case splitTyConApp_maybe kind of
Just (tycon, [_]) | tycon == typeCon -> boxedTypeKind
other -> kind
fix_up (TyConApp tycon _) | tycon == typeCon
|| tycon == openKindCon = boxedTypeKind
fix_up (NoteTy _ kind) = fix_up kind
fix_up kind = kind
-- The basic story is
-- typeKind (FunTy arg res) = typeKind res
-- But a function is boxed regardless of its result type
-- Hencd the strange fix-up
-- Hence the strange fix-up.
-- Note that 'res', being the result of a FunTy, can't have
-- a strange kind like (*->*).
typeKind (ForAllTy tv ty) = typeKind ty
\end{code}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment