summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core.hs')
-rw-r--r--compiler/GHC/Core.hs14
1 files changed, 2 insertions, 12 deletions
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs
index a3dedcc0fb..c5d0a86d14 100644
--- a/compiler/GHC/Core.hs
+++ b/compiler/GHC/Core.hs
@@ -46,8 +46,8 @@ module GHC.Core (
collectNBinders,
collectArgs, stripNArgs, collectArgsTicks, flattenBinds,
- exprToType, exprToCoercion_maybe,
- applyTypeToArg, wrapLamBody,
+ exprToType,
+ wrapLamBody,
isValArg, isTypeArg, isCoArg, isTyCoArg, valArgCount, valBndrCount,
isRuntimeArg, isRuntimeVar,
@@ -1904,22 +1904,12 @@ These are defined here to avoid a module loop between GHC.Core.Utils and GHC.Cor
-}
-applyTypeToArg :: Type -> CoreExpr -> Type
--- ^ Determines the type resulting from applying an expression with given type
--- to a given argument expression
-applyTypeToArg fun_ty arg = piResultTy fun_ty (exprToType arg)
-
-- | If the expression is a 'Type', converts. Otherwise,
-- panics. NB: This does /not/ convert 'Coercion' to 'CoercionTy'.
exprToType :: CoreExpr -> Type
exprToType (Type ty) = ty
exprToType _bad = pprPanic "exprToType" empty
--- | If the expression is a 'Coercion', converts.
-exprToCoercion_maybe :: CoreExpr -> Maybe Coercion
-exprToCoercion_maybe (Coercion co) = Just co
-exprToCoercion_maybe _ = Nothing
-
{-
************************************************************************
* *