Commit 9d16808e authored by Gabor Greif's avatar Gabor Greif 💬
Browse files

Typos in error messages and in comments

parent fa46c597
......@@ -179,7 +179,7 @@ Why might the wrapper have anything to do? Two reasons:
The wrapper has the programmer-specified type:
\$wMkT :: a -> T [a]
\$wMkT a x = MkT [a] a [a] x
The third argument is a coerion
The third argument is a coercion
[a] :: [a]~[a]
INVARIANT: the dictionary constructor for a class
......
......@@ -393,7 +393,7 @@ After strictness analysis:
False -> GHC.Types.True;
True -> foo wild_X7 }
It's true that ds_dnz is *itself* absent, b ut the use of wild_X7 means
It's true that ds_dnz is *itself* absent, but the use of wild_X7 means
that it is very much alive and demanded. See Trac #10148 for how the
consequences play out.
......
......@@ -13,7 +13,7 @@
{
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS -Wwarn -w #-}
-- The above -Wwarn supression flag is a temporary kludge.
-- The above -Wwarn suppression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
......
......@@ -197,7 +197,7 @@ convention.
{
{-# LANGUAGE BangPatterns #-} -- required for versions of Happy before 1.18.6
{-# OPTIONS -Wwarn -w #-}
-- The above warning supression flag is a temporary kludge.
-- The above warning suppression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
......
......@@ -768,7 +768,7 @@ InlVanilla. The WARN is just so I can see if it happens a lot.
* *
************************************************************************
Note [Optimise coercion boxes agressively]
Note [Optimise coercion boxes aggressively]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The simple expression optimiser needs to deal with Eq# boxes as follows:
......@@ -789,7 +789,7 @@ We do this for two reasons:
2. The test T4356 fails Lint because it creates a coercion between types
of kind (* -> * -> *) and (?? -> ? -> *), which differ. If we do this
inlining agressively we can collapse away the intermediate coercion between
inlining aggressively we can collapse away the intermediate coercion between
these two types and hence pass Lint again. (This is a sort of a hack.)
In fact, our implementation uses slightly liberalised versions of the second rule
......@@ -827,7 +827,7 @@ simpleOptExpr :: CoreExpr -> CoreExpr
-- or where the RHS is trivial
--
-- We also inline bindings that bind a Eq# box: see
-- See Note [Optimise coercion boxes agressively].
-- See Note [Optimise coercion boxes aggressively].
--
-- The result is NOT guaranteed occurrence-analysed, because
-- in (let x = y in ....) we substitute for x; so y's occ-info
......@@ -904,7 +904,7 @@ simple_opt_expr subst expr
go lam@(Lam {}) = go_lam [] subst lam
go (Case e b ty as)
-- See Note [Optimise coercion boxes agressively]
-- See Note [Optimise coercion boxes aggressively]
| isDeadBinder b
, Just (con, _tys, es) <- exprIsConApp_maybe in_scope_env e'
, Just (altcon, bs, rhs) <- findAlt (DataAlt con) as
......@@ -1034,7 +1034,7 @@ maybe_substitute subst b r
| (Var fun, args) <- collectArgs r
, Just dc <- isDataConWorkId_maybe fun
, dc `hasKey` eqBoxDataConKey || dc `hasKey` coercibleDataConKey
, all exprIsTrivial args = True -- See Note [Optimise coercion boxes agressively]
, all exprIsTrivial args = True -- See Note [Optimise coercion boxes aggressively]
| otherwise = False
----------------------
......
......@@ -485,7 +485,7 @@ For record construction we do this (assuming T has three arguments)
e
(recConErr t1 "M.hs/230/op3")
\end{verbatim}
@recConErr@ then converts its arugment string into a proper message
@recConErr@ then converts its argument string into a proper message
before printing it as
\begin{verbatim}
M.hs, line 230: missing field op1 was evaluated
......
......@@ -1703,7 +1703,7 @@ tyConToIfaceDecl env tycon
-- (a) we don't need to redundantly put them into the interface file
-- (b) when pretty-printing an Iface data declaration in H98-style syntax,
-- we know that the type variables will line up
-- The latter (b) is important because we pretty-print type construtors
-- The latter (b) is important because we pretty-print type constructors
-- by converting to IfaceSyn and pretty-printing that
con_env1 = (fst tc_env1, mkVarEnv (zipEqual "ifaceConDecl" univ_tvs tc_tyvars))
-- A bit grimy, perhaps, but it's simple!
......
......@@ -10,7 +10,7 @@
{
{-# LANGUAGE BangPatterns #-} -- required for versions of Happy before 1.18.6
{-# OPTIONS -Wwarn -w #-}
-- The above warning supression flag is a temporary kludge.
-- The above warning suppression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
......
......@@ -515,7 +515,7 @@ we'd like to transform it to
x' = e
x = x `cast` co -- A trivial binding
There's a chance that e will be a constructor application or function, or something
like that, so moving the coerion to the usage site may well cancel the coersions
like that, so moving the coercion to the usage site may well cancel the coercions
and lead to further optimisation. Example:
data family T a :: *
......
......@@ -1093,7 +1093,7 @@ evalScrutOcc = ScrutOcc emptyUFM
-- Experimentally, this vesion of combineOcc makes ScrutOcc "win", so
-- that if the thing is scrutinised anywhere then we get to see that
-- in the overall result, even if it's also used in a boxed way
-- This might be too agressive; see Note [Reboxing] Alternative 3
-- This might be too aggressive; see Note [Reboxing] Alternative 3
combineOcc :: ArgOcc -> ArgOcc -> ArgOcc
combineOcc NoOcc occ = occ
combineOcc occ NoOcc = occ
......
......@@ -308,7 +308,7 @@ io_hack_reqd :: DataCon -> [Var] -> Bool
-- case foo x s of { (# s, r #) -> y }
-- Is this strict in 'y'. Normally yes, but what if 'foo' is an I/O
-- operation that simply terminates the program (not in an erroneous way)?
-- In that case we should not evaluate y before the call to 'foo'.
-- In that case we should not evaluate 'y' before the call to 'foo'.
-- Hackish solution: spot the IO-like situation and add a virtual branch,
-- as if we had
-- case foo x s of
......
......@@ -1601,7 +1601,7 @@ mkNewTypeEqn dflags overlap_mode tvs
substTheta (zipOpenTvSubst cls_tyvars inst_tys) (classSCTheta cls)
-- Next we collect Coercible constaints between
-- Next we collect Coercible constraints between
-- the Class method types, instantiated with the representation and the
-- newtype type; precisely the constraints required for the
-- calls to coercible that we are going to generate.
......
......@@ -1844,7 +1844,7 @@ isCallStackIP _ _ _
-- | Assumes that we've checked that this is the 'Typeable' class,
-- and it was applied to the correct argument.
matchTypeableClass :: Class -> Kind -> Type -> CtLoc -> TcS LookupInstResult
matchTypeableClass clas k t loc
| isForAllTy k = return NoInstance
......
......@@ -690,7 +690,7 @@ are not made available in the RHS of the match. For example
f :: T a -> Int -> a
f ~(T1 i) y = y
It's obviously not sound to refine a to Int in the right
hand side, because the arugment might not match T1 at all!
hand side, because the argument might not match T1 at all!
Finally, a lazy pattern should not bind any existential type variables
because they won't be in scope when we do the desugaring
......
......@@ -351,7 +351,7 @@ simplifyInfer rhs_tclvl apply_mr name_taus wanteds
<- decideQuantification apply_mr quant_pred_candidates zonked_tau_tvs
-- Emit an implication constraint for the
-- remaining constaints from the RHS
-- remaining constraints from the RHS
; bound_ev_vars <- mapM TcM.newEvVar bound_theta
; let skol_info = InferSkol [ (name, mkSigmaTy [] bound_theta ty)
| (name, ty) <- name_taus ]
......
......@@ -1388,7 +1388,7 @@ annotation anyway. This should be a rare case, indeed. Here is an example:
Here G's kind is (forall k. k -> k), and the desugared RHS of that last
instance of F is (G (* -> (* -> *) -> *) (T1 * (* -> *)) Bool). According to
the algoritm above, there are 3 arguments to G so we should peel off 3
the algorithm above, there are 3 arguments to G so we should peel off 3
arguments in G's kind. But G's kind has only two arguments. This is the
rare special case, and we conservatively choose to put the annotation
in.
......
......@@ -1647,8 +1647,8 @@ checkRepTyCon check_tc ty extra
where
msg = quotes (ppr ty) <+> ptext (sLit "cannot be marshalled in a foreign call")
mk_nt_reason tc tys
| null tys = ptext (sLit "because its data construtor is not in scope")
| otherwise = ptext (sLit "because the data construtor for")
| null tys = ptext (sLit "because its data constructor is not in scope")
| otherwise = ptext (sLit "because the data constructor for")
<+> quotes (ppr tc) <+> ptext (sLit "is not in scope")
nt_fix = ptext (sLit "Possible fix: import the data constructor to bring it into scope")
......
......@@ -472,7 +472,7 @@ it, assume the following definition:
type instance F Int = Bool -- Axiom axF : F Int ~N Bool
newtype Age = MkAge Int -- Axiom axAge : Age ~R Int
data Foo a = MkFoo a -- Role on Foo's parameter is Represntational
data Foo a = MkFoo a -- Role on Foo's parameter is Representational
TyConAppCo Nominal Foo axF : Foo (F Int) ~N Foo Bool
For (TyConAppCo Nominal) all arguments must have role Nominal. Why?
......
......@@ -270,7 +270,7 @@ addPreference (u, c) color
u
-- | Do agressive coalescing on this graph.
-- | Do aggressive coalescing on this graph.
-- returns the new graph and the list of pairs of nodes that got coaleced together.
-- for each pair, the resulting node will have the least key and be second in the pair.
--
......@@ -322,7 +322,7 @@ coalesceGraph' aggressive triv graph kkPairsAcc
pairs -> coalesceGraph' aggressive triv graph' (reverse pairs ++ kkPairsAcc)
-- | Coalesce this pair of nodes unconditionally \/ agressively.
-- | Coalesce this pair of nodes unconditionally \/ aggressively.
-- The resulting node is the one with the least key.
--
-- returns: Just the pair of keys if the nodes were coalesced
......
......@@ -448,7 +448,7 @@ The argument of @NilAbove@ is never @Empty@. Therefore
a @NilAbove@ occupies at least two lines.
\item
The arugment of @TextBeside@ is never @Nest@.
The argument of @TextBeside@ is never @Nest@.
\item
The layouts of the two arguments of @Union@ both flatten to the same string.
......
Supports Markdown
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