summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r--compiler/GHC/Core/Coercion.hs-boot2
-rw-r--r--compiler/GHC/Core/Ppr.hs6
-rw-r--r--compiler/GHC/Core/Type.hs4
-rw-r--r--compiler/GHC/Core/Utils.hs3
4 files changed, 6 insertions, 9 deletions
diff --git a/compiler/GHC/Core/Coercion.hs-boot b/compiler/GHC/Core/Coercion.hs-boot
index 5d5193306e..0d56cf628c 100644
--- a/compiler/GHC/Core/Coercion.hs-boot
+++ b/compiler/GHC/Core/Coercion.hs-boot
@@ -45,8 +45,6 @@ coVarRole :: CoVar -> Role
mkCoercionType :: Role -> Type -> Type -> Type
-data LiftingContext
-liftCoSubst :: HasDebugCallStack => Role -> LiftingContext -> Type -> Coercion
seqCo :: Coercion -> ()
coercionKind :: Coercion -> Pair Type
diff --git a/compiler/GHC/Core/Ppr.hs b/compiler/GHC/Core/Ppr.hs
index 17559cf4a9..d5d21e294d 100644
--- a/compiler/GHC/Core/Ppr.hs
+++ b/compiler/GHC/Core/Ppr.hs
@@ -159,9 +159,9 @@ ppr_binding ann (val_bdr, expr)
-- So refer to printing j = e
= pp_normal_bind
where
- (bndrs, body) = collectBinders expr
- lhs_bndrs = take join_arity bndrs
- rhs = mkLams (drop join_arity bndrs) body
+ (bndrs, body) = collectBinders expr
+ (lhs_bndrs, rest) = splitAt join_arity bndrs
+ rhs = mkLams rest body
pprParendExpr expr = ppr_expr parens expr
pprCoreExpr expr = ppr_expr noParens expr
diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs
index fdd5edbba2..bdf161bf75 100644
--- a/compiler/GHC/Core/Type.hs
+++ b/compiler/GHC/Core/Type.hs
@@ -781,7 +781,7 @@ isBoxedRuntimeRep_maybe rep
-- | Check whether a type of kind 'RuntimeRep' is lifted, unlifted, or unknown.
--
--- `isLiftedRuntimeRep rr` returns:
+-- `runtimeRepLevity_maybe rr` returns:
--
-- * `Just Lifted` if `rr` is `LiftedRep :: RuntimeRep`
-- * `Just Unlifted` if `rr` is definitely unlifted, e.g. `IntRep`
@@ -1028,7 +1028,7 @@ invariant: use it.
Note [Decomposing fat arrow c=>t]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can we unify (a b) with (Eq a => ty)? If we do so, we end up with
-a partial application like ((=>) Eq a) which doesn't make sense in
+a partial application like ((=>) (Eq a)) which doesn't make sense in
source Haskell. In contrast, we *can* unify (a b) with (t1 -> t2).
Here's an example (#9858) of how you might do it:
i :: (Typeable a, Typeable b) => Proxy (a b) -> TypeRep
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index c88ddb3d55..32be6488b8 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -141,8 +141,7 @@ exprType (Lam binder expr) = mkLamType binder (exprType expr)
exprType e@(App _ _)
= case collectArgs e of
(fun, args) -> applyTypeToArgs (pprCoreExpr e) (exprType fun) args
-
-exprType other = pprPanic "exprType" (pprCoreExpr other)
+exprType (Type ty) = pprPanic "exprType" (ppr ty)
coreAltType :: CoreAlt -> Type
-- ^ Returns the type of the alternatives right hand side