Commit 7446c7f6 authored by Gabor Greif's avatar Gabor Greif 💬
Browse files

A bunch of typofixes

parent 2f8e6e7f
......@@ -203,7 +203,7 @@ setIdNotExported :: Id -> Id
setIdNotExported = Var.setIdNotExported
localiseId :: Id -> Id
-- Make an with the same unique and type as the
-- Make an Id with the same unique and type as the
-- incoming Id, but with an *Internal* Name and *LocalId* flavour
localiseId id
| ASSERT( isId id ) isLocalId id && isInternalName name
......
......@@ -55,7 +55,7 @@ import Control.Monad
--
-- This optimisation does three things:
--
-- - If a block finishes in an unconditonal branch to another block
-- - If a block finishes in an unconditional branch to another block
-- and that is the only jump to that block we concatenate the
-- destination block at the end of the current one.
--
......
......@@ -346,7 +346,7 @@ In particular, scrutinee variables `x` in expressions of the form
"wild_". These "wild" variables may appear in the body of the
case-expression, and further, may be shadowed within the body.
So the Unique in an Var is not really unique at all. Still, it's very
So the Unique in a Var is not really unique at all. Still, it's very
useful to give a constant-time equality/ordering for Vars, and to give
a key that can be used to make sets of Vars (VarSet), or mappings from
Vars to other things (VarEnv). Moreover, if you do want to eliminate
......
......@@ -945,7 +945,7 @@ In a function application (f a b)
Code for manipulating sizes
-}
-- | The size of an candidate expression for unfolding
-- | The size of a candidate expression for unfolding
data ExprSize
= TooBig
| SizeIs { _es_size_is :: {-# UNPACK #-} !Int -- ^ Size found
......
......@@ -204,7 +204,7 @@ boxResult :: Type
-- Takes the result of the user-level ccall:
-- either (IO t),
-- or maybe just t for an side-effect-free call
-- or maybe just t for a side-effect-free call
-- Returns a wrapper for the primitive ccall itself, along with the
-- type of the result of the primitive ccall. This result type
-- will be of the form
......
......@@ -560,7 +560,7 @@ We have the following ways to reference things in GHCi:
HValue
------
HValue is a direct reference to an value in the local heap. Obviously
HValue is a direct reference to a value in the local heap. Obviously
we cannot use this to refer to things in the external process.
......
......@@ -975,7 +975,7 @@ data TcSpecPrag
Id
HsWrapper
InlinePragma
-- ^ The Id to be specialised, an wrapper that specialises the
-- ^ The Id to be specialised, a wrapper that specialises the
-- polymorphic function, and inlining spec for the specialised function
deriving Data
......
......@@ -87,7 +87,7 @@ infixl 3 &&&
-- | A binding top-level 'Name' in an interface file (e.g. the name of an
-- 'IfaceDecl').
type IfaceTopBndr = Name
-- It's convenient to have an Name in the IfaceSyn, although in each
-- It's convenient to have a Name in the IfaceSyn, although in each
-- case the namespace is implied by the context. However, having an
-- Name makes things like ifaceDeclImplicitBndrs and ifaceDeclFingerprints
-- very convenient. Moreover, having the key of the binder means that
......
......@@ -108,7 +108,7 @@ data LlvmAtomicOp
-- | Llvm Statements
data LlvmStatement
{- |
Assign an expression to an variable:
Assign an expression to a variable:
* dest: Variable to assign to
* source: Source expression
-}
......@@ -260,7 +260,7 @@ data LlvmExpression
| ALoad LlvmSyncOrdering SingleThreaded LlvmVar
{- |
Navigate in an structure, selecting elements
Navigate in a structure, selecting elements
* inbound: Is the pointer inbounds? (computed pointer doesn't overflow)
* ptr: Location of the structure
* indexes: A list of indexes to select the correct value.
......
......@@ -840,7 +840,7 @@ typeKind normalise str = withSession $ \hsc_env -> do
liftIO $ hscKcType hsc_env normalise str
-----------------------------------------------------------------------------
-- Compile an expression, run it and deliver the result
-- Compile an expression, run it, and deliver the result
-- | Parse an expression, the parsed expression can be further processed and
-- passed to compileParsedExpr.
......@@ -848,19 +848,19 @@ parseExpr :: GhcMonad m => String -> m (LHsExpr GhcPs)
parseExpr expr = withSession $ \hsc_env -> do
liftIO $ runInteractiveHsc hsc_env $ hscParseExpr expr
-- | Compile an expression, run it and deliver the resulting HValue.
-- | Compile an expression, run it, and deliver the resulting HValue.
compileExpr :: GhcMonad m => String -> m HValue
compileExpr expr = do
parsed_expr <- parseExpr expr
compileParsedExpr parsed_expr
-- | Compile an expression, run it and deliver the resulting HValue.
-- | Compile an expression, run it, and deliver the resulting HValue.
compileExprRemote :: GhcMonad m => String -> m ForeignHValue
compileExprRemote expr = do
parsed_expr <- parseExpr expr
compileParsedExprRemote parsed_expr
-- | Compile an parsed expression (before renaming), run it and deliver
-- | Compile a parsed expression (before renaming), run it, and deliver
-- the resulting HValue.
compileParsedExprRemote :: GhcMonad m => LHsExpr GhcPs -> m ForeignHValue
compileParsedExprRemote expr@(L loc _) = withSession $ \hsc_env -> do
......
......@@ -124,7 +124,7 @@ import Data.Version
-- Let @depExposedPackages@ be the transitive closure from @exposedPackages@ of
-- their dependencies.
--
-- * When searching for a module from an preload import declaration,
-- * When searching for a module from a preload import declaration,
-- only the exposed modules in @exposedPackages@ are valid.
--
-- * When searching for a module from an implicit import, all modules
......
......@@ -202,7 +202,7 @@ mkBootTypeEnv exports ids tcs fam_insts
globaliseAndTidyId :: Id -> Id
-- Takes an LocalId with an External Name,
-- Takes a LocalId with an External Name,
-- makes it into a GlobalId
-- * unchanged Name (might be Internal or External)
-- * unchanged details
......
......@@ -720,7 +720,7 @@ data Amode
= Amode AddrMode InstrBlock
{-
Now, given a tree (the argument to an CmmLoad) that references memory,
Now, given a tree (the argument to a CmmLoad) that references memory,
produce a suitable addressing mode.
A Rule of the Game (tm) for Amodes: use of the addr bit must
......
......@@ -163,7 +163,7 @@ stmtToInstrs stmt = do
{-
Now, given a tree (the argument to an CmmLoad) that references memory,
Now, given a tree (the argument to a CmmLoad) that references memory,
produce a suitable addressing mode.
A Rule of the Game (tm) for Amodes: use of the addr bit must
......
......@@ -294,7 +294,7 @@ data Amode
= Amode AddrMode InstrBlock
{-
Now, given a tree (the argument to an CmmLoad) that references memory,
Now, given a tree (the argument to a CmmLoad) that references memory,
produce a suitable addressing mode.
A Rule of the Game (tm) for Amodes: use of the addr bit must
......
......@@ -2005,7 +2005,7 @@ okStmt, okDoStmt, okCompStmt, okParStmt, okPArrStmt
:: DynFlags -> HsStmtContext Name
-> Stmt GhcPs (Located (body GhcPs)) -> Validity
-- Return Nothing if OK, (Just extra) if not ok
-- The "extra" is an SDoc that is appended to an generic error message
-- The "extra" is an SDoc that is appended to a generic error message
okStmt dflags ctxt stmt
= case ctxt of
......
......@@ -865,7 +865,7 @@ f when it is inlined. So our conservative plan (implemented by
updModeForStableUnfoldings) is this:
-------------------------------------------------------------
When simplifying the RHS of an stable unfolding, set the phase
When simplifying the RHS of a stable unfolding, set the phase
to the phase in which the stable unfolding first becomes active
-------------------------------------------------------------
......@@ -1304,7 +1304,7 @@ ones that are trivial):
Note [Stable unfoldings and postInlineUnconditionally]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not do postInlineUnconditionally if the Id has an stable unfolding,
Do not do postInlineUnconditionally if the Id has a stable unfolding,
otherwise we lose the unfolding. Example
-- f has stable unfolding with rhs (e |> co)
......
......@@ -3068,7 +3068,7 @@ and c is unused.
Note [Duplicated env]
~~~~~~~~~~~~~~~~~~~~~
Some of the alternatives are simplified, but have not been turned into a join point
So they *must* have an zapped subst-env. So we can't use completeNonRecX to
So they *must* have a zapped subst-env. So we can't use completeNonRecX to
bind the join point, because it might to do PostInlineUnconditionally, and
we'd lose that when zapping the subst-env. We could have a per-alt subst-env,
but zapping it (as we do in mkDupableCont, the Select case) is safe, and
......@@ -3329,7 +3329,7 @@ Note [Setting the new unfolding]
important: if exprIsConApp says 'yes' for a recursive thing, then we
can get into an infinite loop
If there's an stable unfolding on a loop breaker (which happens for
If there's a stable unfolding on a loop breaker (which happens for
INLINABLE), we hang on to the inlining. It's pretty dodgy, but the
user did say 'INLINE'. May need to revisit this choice.
......
......@@ -364,7 +364,7 @@ stgCsePairs env0 ((b,e):pairs)
mbCons = maybe id (:)
-- The RHS of a binding.
-- If it is an constructor application, either short-cut it or extend the environment
-- If it is a constructor application, either short-cut it or extend the environment
stgCseRhs :: CseEnv -> OutId -> InStgRhs -> (Maybe (OutId, OutStgRhs), CseEnv)
stgCseRhs env bndr (StgRhsCon ccs dataCon args)
| Just other_bndr <- envLookup dataCon args' env
......
......@@ -232,7 +232,7 @@ has no wrapper, the worker for g will rebox p. So we get
g x y p = case p of (I# p#) -> $wg x y p#
Now, in this case the reboxing will float into the True branch, an so
Now, in this case the reboxing will float into the True branch, and so
the allocation will only happen on the error path. But it won't float
inwards if there are multiple branches that call (f p), so the reboxing
will happen on every call of g. Disaster.
......
Markdown is supported
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