Commit 92342d89 authored by simonpj's avatar simonpj
Browse files

[project @ 2004-10-11 16:13:31 by simonpj]

Remove dead code tcSplitMethodTy
parent 041ca5cc
......@@ -38,7 +38,7 @@ module TcType (
tcSplitFunTy_maybe, tcSplitFunTys, tcFunArgTy, tcFunResultTy,
tcSplitTyConApp, tcSplitTyConApp_maybe, tcTyConAppTyCon, tcTyConAppArgs,
tcSplitAppTy_maybe, tcSplitAppTy, tcSplitAppTys, tcSplitSigmaTy,
tcSplitMethodTy, tcGetTyVar_maybe, tcGetTyVar,
tcGetTyVar_maybe, tcGetTyVar,
-- Predicates.
......@@ -480,24 +480,6 @@ tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty)
tcIsTyVarTy :: Type -> Bool
tcIsTyVarTy ty = maybeToBool (tcGetTyVar_maybe ty)
The type of a method for class C is always of the form:
Forall C => sig_ty
where sig_ty is the type given by the method's signature, and thus in general
is a ForallTy. At the point that splitMethodTy is called, it is expected
that the outer Forall has already been stripped off. splitMethodTy then
returns (C, sig_ty') where sig_ty' is sig_ty with any Notes stripped off.
tcSplitMethodTy :: Type -> (PredType, Type)
tcSplitMethodTy ty = split ty
split (FunTy arg res) = case tcSplitPredTy_maybe arg of
Just p -> (p, res)
Nothing -> panic "splitMethodTy"
split (NoteTy n ty) = split ty
split _ = panic "splitMethodTy"
tcSplitDFunTy :: Type -> ([TyVar], [PredType], Class, [Type])
-- Split the type of a dictionary function
Supports Markdown
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