summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2016-01-27 13:15:15 +0100
committerBen Gamari <ben@smart-cactus.org>2016-01-27 13:56:48 +0100
commit4faa1a63d0496fd511d2d139622dbf7ef2ce4655 (patch)
treea0877a6063443197c5425c506ed14354d9fe8060 /compiler/coreSyn
parent45c6fbc5284f83e1253ff9f3b49fe54a76c20ba7 (diff)
downloadhaskell-4faa1a63d0496fd511d2d139622dbf7ef2ce4655.tar.gz
s/unLifted/unlifted for consistency
This was causing trouble as we had to remember when to use "unLifted" and when to use "unlifted". "unlifted" is used instead of "unLifted" as it's a single word. Reviewers: austin, hvr, goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1852
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreLint.hs14
-rw-r--r--compiler/coreSyn/CorePrep.hs4
-rw-r--r--compiler/coreSyn/CoreSubst.hs2
-rw-r--r--compiler/coreSyn/CoreUnfold.hs4
-rw-r--r--compiler/coreSyn/CoreUtils.hs4
5 files changed, 14 insertions, 14 deletions
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 9c61b39fb4..f0f27646a3 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -473,7 +473,7 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
-- Check the let/app invariant
-- See Note [CoreSyn let/app invariant] in CoreSyn
- ; checkL (not (isUnLiftedType binder_ty)
+ ; checkL (not (isUnliftedType binder_ty)
|| (isNonRec rec_flag && exprOkForSpeculation rhs))
(mkRhsPrimMsg binder rhs)
@@ -759,7 +759,7 @@ lintCoreArg fun_ty (Type arg_ty)
lintCoreArg fun_ty arg
= do { arg_ty <- lintCoreExpr arg
- ; checkL (not (isUnLiftedType arg_ty) || exprOkForSpeculation arg)
+ ; checkL (not (isUnliftedType arg_ty) || exprOkForSpeculation arg)
(mkLetAppMsg arg)
; lintValApp arg fun_ty arg_ty }
@@ -1042,7 +1042,7 @@ lintType ty@(TyConApp tc tys)
= lintType ty' -- Expand type synonyms, so that we do not bogusly complain
-- about un-saturated type synonyms
- | isUnLiftedTyCon tc || isTypeSynonymTyCon tc || isTypeFamilyTyCon tc
+ | isUnliftedTyCon tc || isTypeSynonymTyCon tc || isTypeFamilyTyCon tc
-- Also type synonyms and type families
, length tys < tyConArity tc
= failWithL (hang (text "Un-saturated type application") 2 (ppr ty))
@@ -1291,7 +1291,7 @@ lintCoercion (CoVarCo cv)
| otherwise
= do { lintTyCoVarInScope cv
; cv' <- lookupIdInScope cv
- ; lintUnLiftedCoVar cv
+ ; lintUnliftedCoVar cv
; return $ coVarKindsTypesRole cv' }
-- See Note [Bad unsafe coercion]
@@ -1510,9 +1510,9 @@ lintCoercion this@(AxiomRuleCo co cs)
, text "Provided:" <+> int n ]
----------
-lintUnLiftedCoVar :: CoVar -> LintM ()
-lintUnLiftedCoVar cv
- = when (not (isUnLiftedType (coVarKind cv))) $
+lintUnliftedCoVar :: CoVar -> LintM ()
+lintUnliftedCoVar cv
+ = when (not (isUnliftedType (coVarKind cv))) $
failWithL (text "Bad lifted equality:" <+> ppr cv
<+> dcolon <+> ppr (coVarKind cv))
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs
index 724f72bbc4..4708df3f48 100644
--- a/compiler/coreSyn/CorePrep.hs
+++ b/compiler/coreSyn/CorePrep.hs
@@ -368,7 +368,7 @@ cpeBind :: TopLevelFlag -> CorePrepEnv -> CoreBind
cpeBind top_lvl env (NonRec bndr rhs)
= do { (_, bndr1) <- cpCloneBndr env bndr
; let dmd = idDemandInfo bndr
- is_unlifted = isUnLiftedType (idType bndr)
+ is_unlifted = isUnliftedType (idType bndr)
; (floats, bndr2, rhs2) <- cpePair top_lvl NonRecursive
dmd
is_unlifted
@@ -764,7 +764,7 @@ cpeArg env dmd arg arg_ty
arg_float = mkFloat dmd is_unlifted v arg3
; return (addFloat floats2 arg_float, varToCoreExpr v) } }
where
- is_unlifted = isUnLiftedType arg_ty
+ is_unlifted = isUnliftedType arg_ty
is_strict = isStrictDmd dmd
want_float = wantFloatNested NonRecursive (is_strict || is_unlifted)
diff --git a/compiler/coreSyn/CoreSubst.hs b/compiler/coreSyn/CoreSubst.hs
index 8d4529aba5..167654e1ea 100644
--- a/compiler/coreSyn/CoreSubst.hs
+++ b/compiler/coreSyn/CoreSubst.hs
@@ -1063,7 +1063,7 @@ maybe_substitute subst b r
, isAlwaysActive (idInlineActivation b) -- Note [Inline prag in simplOpt]
, not (isStableUnfolding (idUnfolding b))
, not (isExportedId b)
- , not (isUnLiftedType (idType b)) || exprOkForSpeculation r
+ , not (isUnliftedType (idType b)) || exprOkForSpeculation r
= Just (extendIdSubst subst b r)
| otherwise
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs
index 2a7906a908..48cdb5e5f6 100644
--- a/compiler/coreSyn/CoreUnfold.hs
+++ b/compiler/coreSyn/CoreUnfold.hs
@@ -500,7 +500,7 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
size_up (Let (NonRec binder rhs) body)
= size_up rhs `addSizeNSD`
size_up body `addSizeN`
- (if isUnLiftedType (idType binder) then 0 else 10)
+ (if isUnliftedType (idType binder) then 0 else 10)
-- For the allocation
-- If the binder has an unlifted type there is no allocation
@@ -559,7 +559,7 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
-- unboxed variables, inline primops and unsafe foreign calls
-- are all "inline" things:
- is_inline_scrut (Var v) = isUnLiftedType (idType v)
+ is_inline_scrut (Var v) = isUnliftedType (idType v)
is_inline_scrut scrut
| (Var f, _) <- collectArgs scrut
= case idDetails f of
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index eaccb33e91..a403f290ec 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -429,7 +429,7 @@ bindNonRec bndr rhs body
-- | Tests whether we have to use a @case@ rather than @let@ binding for this expression
-- as per the invariants of 'CoreExpr': see "CoreSyn#let_app_invariant"
needsCaseBinding :: Type -> CoreExpr -> Bool
-needsCaseBinding ty rhs = isUnLiftedType ty && not (exprOkForSpeculation rhs)
+needsCaseBinding ty rhs = isUnliftedType ty && not (exprOkForSpeculation rhs)
-- Make a case expression instead of a let
-- These can arise either from the desugarer,
-- or from beta reductions: (\x.e) (x +# y)
@@ -1278,7 +1278,7 @@ app_ok primop_ok fun args
-> primop_ok op -- A bit conservative: we don't really need
&& all (expr_ok primop_ok) args -- to care about lazy arguments, but this is easy
- _other -> isUnLiftedType (idType fun) -- c.f. the Var case of exprIsHNF
+ _other -> isUnliftedType (idType fun) -- c.f. the Var case of exprIsHNF
|| idArity fun > n_val_args -- Partial apps
|| (n_val_args == 0 &&
isEvaldUnfolding (idUnfolding fun)) -- Let-bound values