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

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.
......
......@@ -365,7 +365,7 @@ buildToArrPReprs vect_tc repr_co _ pdatas_tc r
-- eg: (xss :: PDatas (Tree a b))
varg <- newLocalVar (fsLit "xss") arg_ty
-- Coersion to case between the (PRepr a) type and its instance.
-- Coercion to case between the (PRepr a) type and its instance.
pdatas_co <- mkBuiltinCo pdatasTyCon
let co = mkAppCo pdatas_co
. mkSymCo
......
......@@ -130,7 +130,7 @@ splitPrimTyCon ty
-- Coercion Construction -----------------------------------------------------
-- |Make a representational coersion to some builtin type.
-- |Make a representational coercion to some builtin type.
--
mkBuiltinCo :: (Builtins -> TyCon) -> VM Coercion
mkBuiltinCo get_tc
......
......@@ -530,7 +530,7 @@
</sect2>
<sect2 id="supression">
<sect2 id="suppression">
<title>Suppressing unwanted information</title>
<indexterm><primary>suppression</primary></indexterm>
......
......@@ -4964,7 +4964,7 @@ Specfically, <option>-XFlexibleContexts</option>, allows (well-kinded) class con
of form <literal>(C t1 ... tn)</literal> in the context of an instance declaration.
</para>
<para>
Notice that the flag does not affect equality constaints in an instance context;
Notice that the flag does not affect equality constraints in an instance context;
they are permitted by <option>-XTypeFamilies</option> or <option>-XGADTs</option>.
</para>
<para>
......
......@@ -191,7 +191,7 @@ INLINE_HEADER Time fsecondsToTime (double t)
#include "rts/Config.h"
/* Global constaints */
/* Global constraints */
#include "rts/Constants.h"
/* Profiling information */
......
......@@ -2199,7 +2199,7 @@ checkHeapSanityForRetainerProfiling( void )
/*
After all live objects have been scavenged, the garbage
collector may create some objects in
scheduleFinalizers(). These objects are created throught
scheduleFinalizers(). These objects are created through
allocate(), so the small object pool or the large object
pool of the g0s0 may not be empty.
*/
......
......@@ -422,7 +422,7 @@ rts/RetainerSet_CC_OPTS += -Wno-format
# On Windows:
rts/win32/ConsoleHandler_CC_OPTS += -w
rts/win32/ThrIOManager_CC_OPTS += -w
# The above warning supression flags are a temporary kludge.
# The above warning suppression flags are 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/WorkingConventions#Warnings
......
......@@ -2,7 +2,7 @@
ccfail004.hs:9:1:
Unacceptable argument type in foreign declaration:
‘NInt’ cannot be marshalled in a foreign call
because its data construtor is not in scope
because its data constructor is not in scope
Possible fix: import the data constructor to bring it into scope
When checking declaration:
foreign import ccall safe "static f1" f1 :: NInt -> IO Int
......@@ -10,7 +10,7 @@ ccfail004.hs:9:1:
ccfail004.hs:10:1:
Unacceptable result type in foreign declaration:
‘NInt’ cannot be marshalled in a foreign call
because its data construtor is not in scope
because its data constructor is not in scope
Possible fix: import the data constructor to bring it into scope
When checking declaration:
foreign import ccall safe "static f2" f2 :: Int -> IO NInt
......@@ -18,7 +18,7 @@ ccfail004.hs:10:1:
ccfail004.hs:11:1:
Unacceptable result type in foreign declaration:
‘NIO Int’ cannot be marshalled in a foreign call
because the data construtor for ‘NIO’ is not in scope
because the data constructor for ‘NIO’ is not in scope
Possible fix: import the data constructor to bring it into scope
When checking declaration:
foreign import ccall safe "static f3" f3 :: Int -> NIO Int
......
......@@ -329,7 +329,7 @@ test('T5030',
# previous: 196457520
# 2012-10-08: 259547660 (x86/Linux, new codegen)
# 2013-11-21: 198573456 (x86 Windows, 64 bit machine)
# 2014-12-10: 227205560 constraint solver got worse again; more agressive solving
# 2014-12-10: 227205560 constraint solver got worse again; more aggressive solving
# of family-applications leads to less sharing, I think
(wordsize(64), 403932600, 10)]),
......@@ -346,7 +346,7 @@ test('T5030',
# general round of updates
# 2014-09-10 385152728 post-AMP-cleanup
# 2014-12-08 340969128 constraint solver perf improvements (esp kick-out)
# 2014-12-10 449042120 constraint solver got worse again; more agressive solving
# 2014-12-10 449042120 constraint solver got worse again; more aggressive solving
# of family-applications leads to less sharing, I think
# 2015-03-17 403932600 tweak to solver algorithm
......
......@@ -215,7 +215,7 @@ opcodes =
, ("false", TBool False, error "incorrect use of false")
, ("true", TBool True, error "incorrect use of true")
] ++ map (\ (a,b,c) -> (a,TOp b,c))
-- These are just invocation, any coersions need to occur between here
-- These are just invocation, any coercions need to occur between here
-- and before arriving at the application code (like deg -> rad).
[ ("acos", Op_acos, Real_Real (rad2deg . acos))
, ("addi", Op_addi, Int_Int_Int (+))
......
-- This one killed GHC 6.4 because it bogusly attributed
-- the CPR property to the construtor T
-- the CPR property to the constructor T
-- Result: a mkWWcpr crash
-- Needs -prof -auto-all to show it up
......
-- Tests that subFunTys works when the arugment is a type of form (a ty1 ty2)
-- Tests that subFunTys works when the argument is a type of form (a ty1 ty2)
module ShouldCompile where
......
......@@ -2,7 +2,7 @@
{
{-# LANGUAGE BangPatterns #-} -- required for versions of Alex before 2.3.4
{-# OPTIONS -w -Wwarn #-}
-- 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
......
{
{-# LANGUAGE BangPatterns #-} -- required for versions of Happy before 1.18.6
{-# OPTIONS -w -Wwarn #-}
-- 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
......
......@@ -9,7 +9,7 @@
-- the generalisation. Better would be to make Happy generate
-- an appropriate signature.
--
-- 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
......
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