summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap/Utils.hs2
-rw-r--r--compiler/GHC/Core/Type.hs8
-rw-r--r--compiler/GHC/Core/Utils.hs8
3 files changed, 9 insertions, 9 deletions
diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
index 6bb751d803..63ac670418 100644
--- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
@@ -1131,7 +1131,7 @@ Needless to say, there are some wrinkles:
of the form @TYPE rep@ where @rep@ is not (and doesn't contain) a variable.
Why? Because if we don't know its representation (e.g. size in memory,
register class), we don't know what or how much rubbish to emit in codegen.
- 'typeMonoPrimRep_maybe' returns 'Nothing' in this case and we simply fall
+ 'mkLitRubbish' returns 'Nothing' in this case and we simply fall
back to passing the original parameter to the worker.
Note that currently this case should not occur, because binders always
diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs
index 6adf7c7a34..bc864c301f 100644
--- a/compiler/GHC/Core/Type.hs
+++ b/compiler/GHC/Core/Type.hs
@@ -1428,13 +1428,13 @@ applyTysX :: [TyVar] -> Type -> [Type] -> Type
-- applyTyxX beta-reduces (/\tvs. body_ty) arg_tys
-- Assumes that (/\tvs. body_ty) is closed
applyTysX tvs body_ty arg_tys
- = assertPpr (arg_tys `lengthAtLeast` n_tvs) pp_stuff $
+ = assertPpr (tvs `leLength` arg_tys) pp_stuff $
assertPpr (tyCoVarsOfType body_ty `subVarSet` mkVarSet tvs) pp_stuff $
- mkAppTys (substTyWith tvs (take n_tvs arg_tys) body_ty)
- (drop n_tvs arg_tys)
+ mkAppTys (substTyWith tvs arg_tys_prefix body_ty)
+ arg_tys_rest
where
pp_stuff = vcat [ppr tvs, ppr body_ty, ppr arg_tys]
- n_tvs = length tvs
+ (arg_tys_prefix, arg_tys_rest) = splitAtList tvs arg_tys
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index 5100f958e6..90f8f3f032 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -41,8 +41,8 @@ module GHC.Core.Utils (
tryEtaReduce, canEtaReduceToArity,
-- * Manipulating data constructors and types
- exprToType, exprToCoercion_maybe,
- applyTypeToArgs, applyTypeToArg,
+ exprToType,
+ applyTypeToArgs,
dataConRepInstPat, dataConRepFSInstPat,
isEmptyTy, normSplitTyConApp_maybe,
@@ -232,9 +232,9 @@ Various possibilities suggest themselves:
Note that there might be existentially quantified coercion variables, too.
-}
--- Not defined with applyTypeToArg because you can't print from GHC.Core.
applyTypeToArgs :: HasDebugCallStack => SDoc -> Type -> [CoreExpr] -> Type
--- ^ A more efficient version of 'applyTypeToArg' when we have several arguments.
+-- ^ Determines the type resulting from applying an expression with given type
+--- to given argument expressions.
-- The first argument is just for debugging, and gives some context
applyTypeToArgs pp_e op_ty args
= go op_ty args