summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2013-01-24 16:06:57 +0100
committerGabor Greif <ggreif@gmail.com>2013-01-30 21:45:31 +0100
commit3e1745aa272077c98254ce9b79e62b92c40948a9 (patch)
treed9dca5075561442dafcf8bb3cb627dec7cc0a9e6 /compiler
parenta217e7a27a8d48095e2e276ed07a203254bf8743 (diff)
downloadhaskell-3e1745aa272077c98254ce9b79e62b92c40948a9.tar.gz
typos
Diffstat (limited to 'compiler')
-rw-r--r--compiler/basicTypes/MkId.lhs2
-rw-r--r--compiler/basicTypes/SrcLoc.lhs4
-rw-r--r--compiler/basicTypes/Var.lhs2
-rw-r--r--compiler/coreSyn/CoreArity.lhs2
-rw-r--r--compiler/coreSyn/CoreLint.lhs2
-rw-r--r--compiler/coreSyn/CoreSubst.lhs4
-rw-r--r--compiler/coreSyn/CoreUtils.lhs2
-rw-r--r--compiler/deSugar/Desugar.lhs2
-rw-r--r--compiler/deSugar/DsBinds.lhs4
-rw-r--r--compiler/deSugar/DsExpr.lhs2
-rw-r--r--compiler/deSugar/DsMeta.hs6
-rw-r--r--compiler/deSugar/DsUtils.lhs2
-rw-r--r--compiler/deSugar/MatchLit.lhs2
-rw-r--r--compiler/iface/IfaceSyn.lhs2
-rw-r--r--compiler/main/TidyPgm.lhs4
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs2
-rw-r--r--compiler/prelude/TysPrim.lhs4
-rw-r--r--compiler/rename/RnEnv.lhs2
-rw-r--r--compiler/rename/RnExpr.lhs2
-rw-r--r--compiler/rename/RnNames.lhs4
-rw-r--r--compiler/simplCore/LiberateCase.lhs2
-rw-r--r--compiler/simplCore/SimplCore.lhs2
-rw-r--r--compiler/simplCore/SimplEnv.lhs2
-rw-r--r--compiler/simplCore/SimplUtils.lhs4
-rw-r--r--compiler/simplCore/Simplify.lhs6
-rw-r--r--compiler/specialise/SpecConstr.lhs4
-rw-r--r--compiler/specialise/Specialise.lhs2
-rw-r--r--compiler/stgSyn/StgLint.lhs2
-rw-r--r--compiler/typecheck/TcErrors.lhs4
-rw-r--r--compiler/typecheck/TcExpr.lhs2
-rw-r--r--compiler/typecheck/TcGenDeriv.lhs4
-rw-r--r--compiler/typecheck/TcHsSyn.lhs2
-rw-r--r--compiler/typecheck/TcHsType.lhs2
-rw-r--r--compiler/typecheck/TcInstDcls.lhs6
-rw-r--r--compiler/typecheck/TcInteract.lhs2
-rw-r--r--compiler/typecheck/TcPat.lhs4
-rw-r--r--compiler/typecheck/TcRnDriver.lhs2
-rw-r--r--compiler/typecheck/TcRnTypes.lhs2
-rw-r--r--compiler/typecheck/TcSimplify.lhs2
-rw-r--r--compiler/typecheck/TcSplice.lhs4
-rw-r--r--compiler/typecheck/TcTyClsDecls.lhs4
-rw-r--r--compiler/typecheck/TcUnify.lhs2
-rw-r--r--compiler/types/OptCoercion.lhs4
-rw-r--r--compiler/types/TyCon.lhs2
-rw-r--r--compiler/types/TypeRep.lhs2
45 files changed, 65 insertions, 65 deletions
diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs
index 8957924618..112664c1e2 100644
--- a/compiler/basicTypes/MkId.lhs
+++ b/compiler/basicTypes/MkId.lhs
@@ -291,7 +291,7 @@ mkDictSelId dflags no_unf name clas
else mkImplicitUnfolding dflags rhs)
-- In module where class op is defined, we must add
-- the unfolding, even though it'll never be inlined
- -- becuase we use that to generate a top-level binding
+ -- because we use that to generate a top-level binding
-- for the ClassOp
info | new_tycon = base_info `setInlinePragInfo` alwaysInlinePragma
diff --git a/compiler/basicTypes/SrcLoc.lhs b/compiler/basicTypes/SrcLoc.lhs
index 2c008f55d8..cfd846a560 100644
--- a/compiler/basicTypes/SrcLoc.lhs
+++ b/compiler/basicTypes/SrcLoc.lhs
@@ -257,7 +257,7 @@ data RealSrcSpan
srcSpanLine :: {-# UNPACK #-} !Int,
srcSpanCol :: {-# UNPACK #-} !Int
}
- deriving (Eq, Typeable, Show) -- Show is used by Lexer.x, becuase we
+ deriving (Eq, Typeable, Show) -- Show is used by Lexer.x, because we
-- derive Show for Token
data SrcSpan =
@@ -265,7 +265,7 @@ data SrcSpan =
| UnhelpfulSpan !FastString -- Just a general indication
-- also used to indicate an empty span
- deriving (Eq, Typeable, Show) -- Show is used by Lexer.x, becuase we
+ deriving (Eq, Typeable, Show) -- Show is used by Lexer.x, because we
-- derive Show for Token
-- | Built-in "bad" 'SrcSpan's for common sources of location uncertainty
diff --git a/compiler/basicTypes/Var.lhs b/compiler/basicTypes/Var.lhs
index 6d078d46e9..16eb886b01 100644
--- a/compiler/basicTypes/Var.lhs
+++ b/compiler/basicTypes/Var.lhs
@@ -352,7 +352,7 @@ idDetails (Id { id_details = details }) = details
idDetails other = pprPanic "idDetails" (ppr other)
-- The next three have a 'Var' suffix even though they always build
--- Ids, becuase Id.lhs uses 'mkGlobalId' etc with different types
+-- Ids, because Id.lhs uses 'mkGlobalId' etc with different types
mkGlobalVar :: IdDetails -> Name -> Type -> IdInfo -> Id
mkGlobalVar details name ty info
= mk_id name ty GlobalId details info
diff --git a/compiler/coreSyn/CoreArity.lhs b/compiler/coreSyn/CoreArity.lhs
index 50b834be3f..6b9e3e8d9f 100644
--- a/compiler/coreSyn/CoreArity.lhs
+++ b/compiler/coreSyn/CoreArity.lhs
@@ -202,7 +202,7 @@ slightly more complicated, does) turn into
blah = op (\eta. ($dfList dCInt |> sym co) eta)
-and now it is *much* harder for the op/$dfList rule to fire, becuase
+and now it is *much* harder for the op/$dfList rule to fire, because
exprIsConApp_maybe won't hold of the argument to op. I considered
trying to *make* it hold, but it's tricky and I gave up.
diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index 502de84a81..0e9bcce895 100644
--- a/compiler/coreSyn/CoreLint.lhs
+++ b/compiler/coreSyn/CoreLint.lhs
@@ -144,7 +144,7 @@ lintCoreBindings binds
-- allow this at top level:
-- M.n{r3} = ...
-- M.n{r29} = ...
- -- becuase they both get the same linker symbol
+ -- because they both get the same linker symbol
ext_dups = snd (removeDups ord_ext (map Var.varName binders))
ord_ext n1 n2 | Just m1 <- nameModule_maybe n1
, Just m2 <- nameModule_maybe n2
diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs
index d8a1d2e1bd..c88f7268f9 100644
--- a/compiler/coreSyn/CoreSubst.lhs
+++ b/compiler/coreSyn/CoreSubst.lhs
@@ -436,7 +436,7 @@ substBind subst (Rec pairs) = (subst', Rec (bndrs' `zip` rhss'))
\begin{code}
-- | De-shadowing the program is sometimes a useful pre-pass. It can be done simply
--- by running over the bindings with an empty substitution, becuase substitution
+-- by running over the bindings with an empty substitution, because substitution
-- returns a result that has no-shadowing guaranteed.
--
-- (Actually, within a single /type/ there might still be shadowing, because
@@ -868,7 +868,7 @@ simpleOptExpr :: CoreExpr -> CoreExpr
-- We also inline bindings that bind a Eq# box: see
-- See Note [Optimise coercion boxes agressively].
--
--- The result is NOT guaranteed occurence-analysed, becuase
+-- The result is NOT guaranteed occurence-analysed, because
-- in (let x = y in ....) we substitute for x; so y's occ-info
-- may change radically
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs
index 9b527e7fcf..6726087bee 100644
--- a/compiler/coreSyn/CoreUtils.lhs
+++ b/compiler/coreSyn/CoreUtils.lhs
@@ -525,7 +525,7 @@ There used to be a gruesome test for (hasNoBinding v) in the
Var case:
exprIsTrivial (Var v) | hasNoBinding v = idArity v == 0
The idea here is that a constructor worker, like \$wJust, is
-really short for (\x -> \$wJust x), becuase \$wJust has no binding.
+really short for (\x -> \$wJust x), because \$wJust has no binding.
So it should be treated like a lambda. Ditto unsaturated primops.
But now constructor workers are not "have-no-binding" Ids. And
completely un-applied primops and foreign-call Ids are sufficiently
diff --git a/compiler/deSugar/Desugar.lhs b/compiler/deSugar/Desugar.lhs
index 9a73893b44..2d8918bfd2 100644
--- a/compiler/deSugar/Desugar.lhs
+++ b/compiler/deSugar/Desugar.lhs
@@ -371,7 +371,7 @@ dsRule (L loc (HsRule name act vars lhs _tv_lhs rhs _fv_rhs))
Right (final_bndrs, fn_id, args) -> do
{ let is_local = isLocalId fn_id
- -- NB: isLocalId is False of implicit Ids. This is good becuase
+ -- NB: isLocalId is False of implicit Ids. This is good because
-- we don't want to attach rules to the bindings of implicit Ids,
-- because they don't show up in the bindings until just before code gen
fn_name = idName fn_id
diff --git a/compiler/deSugar/DsBinds.lhs b/compiler/deSugar/DsBinds.lhs
index a392d7441e..41172e1dd7 100644
--- a/compiler/deSugar/DsBinds.lhs
+++ b/compiler/deSugar/DsBinds.lhs
@@ -662,8 +662,8 @@ It's true that this *is* a more specialised type, but the rule
we get is something like this:
f_spec d = f
RULE: f = f_spec d
-Note that the rule is bogus, becuase it mentions a 'd' that is
-not bound on the LHS! But it's a silly specialisation anyway, becuase
+Note that the rule is bogus, because it mentions a 'd' that is
+not bound on the LHS! But it's a silly specialisation anyway, because
the constraint is unused. We could bind 'd' to (error "unused")
but it seems better to reject the program because it's almost certainly
a mistake. That's what the isDeadBinder call detects.
diff --git a/compiler/deSugar/DsExpr.lhs b/compiler/deSugar/DsExpr.lhs
index 6df618c645..cfda20adda 100644
--- a/compiler/deSugar/DsExpr.lhs
+++ b/compiler/deSugar/DsExpr.lhs
@@ -820,7 +820,7 @@ conversionNames
= [ toIntegerName, toRationalName
, fromIntegralName, realToFracName ]
-- We can't easily add fromIntegerName, fromRationalName,
- -- becuase they are generated by literals
+ -- because they are generated by literals
\end{code}
%************************************************************************
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs
index 04ffb766a0..9a9f89d40f 100644
--- a/compiler/deSugar/DsMeta.hs
+++ b/compiler/deSugar/DsMeta.hs
@@ -8,7 +8,7 @@
-- CoreExpr's of the "smart constructors" of the Meta.Exp datatype.
--
-- It also defines a bunch of knownKeyNames, in the same way as is done
--- in prelude/PrelNames. It's much more convenient to do it here, becuase
+-- in prelude/PrelNames. It's much more convenient to do it here, because
-- otherwise we have to recompile PrelNames whenever we add a Name, which is
-- a Royal Pain (triggers other recompilation).
-----------------------------------------------------------------------------
@@ -351,7 +351,7 @@ repClsInstD (ClsInstDecl { cid_poly_ty = ty, cid_binds = binds
-- appear in the resulting data structure
--
-- But we do NOT bring the binders of 'binds' into scope
- -- becuase they are properly regarded as occurrences
+ -- because they are properly regarded as occurrences
-- For example, the method names should be bound to
-- the selector Ids, not to fresh names (Trac #5410)
--
@@ -1876,7 +1876,7 @@ mk_string s = return $ HsString s
repOverloadedLiteral :: HsOverLit Name -> DsM (Core TH.Lit)
repOverloadedLiteral (OverLit { ol_val = val})
= do { lit <- mk_lit val; repLiteral lit }
- -- The type Rational will be in the environment, becuase
+ -- The type Rational will be in the environment, because
-- the smart constructor 'TH.Syntax.rationalL' uses it in its type,
-- and rationalL is sucked in when any TH stuff is used
diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs
index e05a175950..15f76b6912 100644
--- a/compiler/deSugar/DsUtils.lhs
+++ b/compiler/deSugar/DsUtils.lhs
@@ -291,7 +291,7 @@ mkCoAlgCaseMatchResult dflags var ty match_alts
= MatchResult fail_flag mk_case
where
tycon = dataConTyCon con1
- -- [Interesting: becuase of GADTs, we can't rely on the type of
+ -- [Interesting: because of GADTs, we can't rely on the type of
-- the scrutinised Id to be sufficiently refined to have a TyCon in it]
-- Stuff for newtype
diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs
index b9b6ec5a4f..f3c9894b57 100644
--- a/compiler/deSugar/MatchLit.lhs
+++ b/compiler/deSugar/MatchLit.lhs
@@ -113,7 +113,7 @@ dsOverLit' dflags (OverLit { ol_val = val, ol_rebindable = rebindable
Note [Literal short cut]
~~~~~~~~~~~~~~~~~~~~~~~~
The type checker tries to do this short-cutting as early as possible, but
-becuase of unification etc, more information is available to the desugarer.
+because of unification etc, more information is available to the desugarer.
And where it's possible to generate the correct literal right away, it's
much better do do so.
diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs
index d8b3b95d33..2cc0c63f4c 100644
--- a/compiler/iface/IfaceSyn.lhs
+++ b/compiler/iface/IfaceSyn.lhs
@@ -206,7 +206,7 @@ type IfaceAnnTarget = AnnTarget OccName
-- We only serialise the IdDetails of top-level Ids, and even then
-- we only need a very limited selection. Notably, none of the
--- implicit ones are needed here, becuase they are not put it
+-- implicit ones are needed here, because they are not put it
-- interface files
data IfaceIdDetails
diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs
index 884f6ab61f..3f68f0fb09 100644
--- a/compiler/main/TidyPgm.lhs
+++ b/compiler/main/TidyPgm.lhs
@@ -476,7 +476,7 @@ Note [Don't attempt to trim data types]
For some time GHC tried to avoid exporting the data constructors
of a data type if it wasn't strictly necessary to do so; see Trac #835.
But "strictly necessary" accumulated a longer and longer list
-of execeptions, and finally I gave up the battle:
+of exceptions, and finally I gave up the battle:
commit 9a20e540754fc2af74c2e7392f2786a81d8d5f11
Author: Simon Peyton Jones <simonpj@microsoft.com>
@@ -525,7 +525,7 @@ Id still makes sense.]
At one time I tried injecting the implicit bindings *early*, at the
beginning of SimplCore. But that gave rise to real difficulty,
-becuase GlobalIds are supposed to have *fixed* IdInfo, but the
+because GlobalIds are supposed to have *fixed* IdInfo, but the
simplifier and other core-to-core passes mess with IdInfo all the
time. The straw that broke the camels back was when a class selector
got the wrong arity -- ie the simplifier gave it arity 2, whereas
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index d01470926b..5d904204ac 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -749,7 +749,7 @@ getRegister' _ is32Bit (CmmMachOp mop [x, y]) = do -- dyadic MachOps
* so we can either:
- do y first, put its result in a fresh tmp, then copy it to %ecx later
- do y second and put its result into %ecx. x gets placed in a fresh
- tmp. This is likely to be better, becuase the reg alloc can
+ tmp. This is likely to be better, because the reg alloc can
eliminate this reg->reg move here (it won't eliminate the other one,
because the move is into the fixed %ecx).
-}
diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs
index 8b9cbf9ac2..44ba035dc0 100644
--- a/compiler/prelude/TysPrim.lhs
+++ b/compiler/prelude/TysPrim.lhs
@@ -241,7 +241,7 @@ funTyCon = mkFunTyCon funTyConName $
-- You might think that (->) should have type (?? -> ? -> *), and you'd be right
-- But if we do that we get kind errors when saying
-- instance Control.Arrow (->)
- -- becuase the expected kind is (*->*->*). The trouble is that the
+ -- because the expected kind is (*->*->*). The trouble is that the
-- expected/actual stuff in the unifier does not go contra-variant, whereas
-- the kind sub-typing does. Sigh. It really only matters if you use (->) in
-- a prefix way, thus: (->) Int# Int#. And this is unusual.
@@ -653,7 +653,7 @@ The type constructor Any of kind forall k. k -> k has these properties:
* It is a *closed* type family, with no instances. This means that
if ty :: '(k1, k2) we add a given coercion
g :: ty ~ (Fst ty, Snd ty)
- If Any was a *data* type, then we'd get inconsistency becuase 'ty'
+ If Any was a *data* type, then we'd get inconsistency because 'ty'
could be (Any '(k1,k2)) and then we'd have an equality with Any on
one side and '(,) on the other
diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs
index 452025b7cc..038e775fe9 100644
--- a/compiler/rename/RnEnv.lhs
+++ b/compiler/rename/RnEnv.lhs
@@ -440,7 +440,7 @@ Thus:
instance C S where
data G S = Y1 | Y2
Even though there are two G's in scope (M.G and Blib.G), the occurence
-of 'G' in the 'instance C S' decl is unambiguous, becuase C has only
+of 'G' in the 'instance C S' decl is unambiguous, because C has only
one associated type called G. This is exactly what happens for methods,
and it is only consistent to do the same thing for types. That's the
role of the function lookupTcdName; the (Maybe Name) give the class of
diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs
index 2a8e7ab589..ba41a27e2b 100644
--- a/compiler/rename/RnExpr.lhs
+++ b/compiler/rename/RnExpr.lhs
@@ -1056,7 +1056,7 @@ rn_rec_stmt _ all_bndrs (L loc (LetStmt (HsValBinds binds'))) _ = do
return [(duDefs du_binds, allUses du_binds,
emptyNameSet, L loc (LetStmt (HsValBinds binds')))]
--- no RecStmt case becuase they get flattened above when doing the LHSes
+-- no RecStmt case because they get flattened above when doing the LHSes
rn_rec_stmt _ _ stmt@(L _ (RecStmt {})) _
= pprPanic "rn_rec_stmt: RecStmt" (ppr stmt)
diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs
index 1c4487026d..2055f8a989 100644
--- a/compiler/rename/RnNames.lhs
+++ b/compiler/rename/RnNames.lhs
@@ -905,7 +905,7 @@ What does M export? AvailTC F [FInt]
The former is strictly right because F isn't defined in this module.
But then you can never do an explicit import of M, thus
import M( F( FInt ) )
-becuase F isn't exported by M. Nor can you import FInt alone from here
+because F isn't exported by M. Nor can you import FInt alone from here
import M( FInt )
because we don't have syntax to support that. (It looks like an import of
the type FInt.)
@@ -1334,7 +1334,7 @@ each import declaration, what stuff brought into scope by that
declaration is actually used in the module.
The SrcLoc is the location of the END of a particular 'import'
-declaration. Why *END*? Becuase we don't want to get confused
+declaration. Why *END*? Because we don't want to get confused
by the implicit Prelude import. Consider (Trac #7476) the module
import Foo( foo )
main = print foo
diff --git a/compiler/simplCore/LiberateCase.lhs b/compiler/simplCore/LiberateCase.lhs
index 9f83043740..1f80f8f460 100644
--- a/compiler/simplCore/LiberateCase.lhs
+++ b/compiler/simplCore/LiberateCase.lhs
@@ -277,7 +277,7 @@ We get the following levels
Then 'x' is being scrutinised at a deeper level than its binding, so
it's added to lc_sruts: [(x,1)]
-We do *not* want to specialise the call to 'f', becuase 'x' is not free
+We do *not* want to specialise the call to 'f', because 'x' is not free
in 'f'. So here the bind-level of 'x' (=1) is not <= the bind-level of 'f' (=0).
We *do* want to specialise the call to 'g', because 'x' is free in g.
diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs
index 8270260e16..11e201a0a0 100644
--- a/compiler/simplCore/SimplCore.lhs
+++ b/compiler/simplCore/SimplCore.lhs
@@ -855,7 +855,7 @@ makeIndEnv binds
shortMeOut :: IndEnv -> Id -> Id -> Bool
shortMeOut ind_env exported_id local_id
-- The if-then-else stuff is just so I can get a pprTrace to see
--- how often I don't get shorting out becuase of IdInfo stuff
+-- how often I don't get shorting out because of IdInfo stuff
= if isExportedId exported_id && -- Only if this is exported
isLocalId local_id && -- Only if this one is defined in this
diff --git a/compiler/simplCore/SimplEnv.lhs b/compiler/simplCore/SimplEnv.lhs
index d879073e33..333eba7f14 100644
--- a/compiler/simplCore/SimplEnv.lhs
+++ b/compiler/simplCore/SimplEnv.lhs
@@ -679,7 +679,7 @@ We *do* transfer the arity from from the in_id of a let binding to the
out_id. This is important, so that the arity of an Id is visible in
its own RHS. For example:
f = \x. ....g (\y. f y)....
-We can eta-reduce the arg to g, becuase f is a value. But that
+We can eta-reduce the arg to g, because f is a value. But that
needs to be visible.
This interacts with the 'state hack' too:
diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs
index 00c55e533f..7bc10de43f 100644
--- a/compiler/simplCore/SimplUtils.lhs
+++ b/compiler/simplCore/SimplUtils.lhs
@@ -509,7 +509,7 @@ updModeForInlineRules inline_rule_act current_mode
, sm_inline = True
, sm_eta_expand = False }
-- For sm_rules, just inherit; sm_rules might be "off"
- -- becuase of -fno-enable-rewrite-rules
+ -- because of -fno-enable-rewrite-rules
where
phaseFromActivation (ActiveAfter n) = Phase n
phaseFromActivation _ = InitialPhase
@@ -933,7 +933,7 @@ postInlineUnconditionally dflags env top_lvl bndr occ_info rhs unfolding
= case occ_info of
-- The point of examining occ_info here is that for *non-values*
-- that occur outside a lambda, the call-site inliner won't have
- -- a chance (becuase it doesn't know that the thing
+ -- a chance (because it doesn't know that the thing
-- only occurs once). The pre-inliner won't have gotten
-- it either, if the thing occurs in more than one branch
-- So the main target is things like
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index 91fc457636..d30e826f93 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -331,7 +331,7 @@ simplLazyBind env top_lvl is_rec bndr bndr1 rhs rhs_se
not_lam (Lam _ _) = False
not_lam _ = True
-- Do not do the "abstract tyyvar" thing if there's
- -- a lambda inside, becuase it defeats eta-reduction
+ -- a lambda inside, because it defeats eta-reduction
-- f = /\a. \x. g a x
-- should eta-reduce
@@ -781,7 +781,7 @@ on to the old unfolding (which is part of the id).
Note [Arity decrease]
~~~~~~~~~~~~~~~~~~~~~
Generally speaking the arity of a binding should not decrease. But it *can*
-legitimately happen becuase of RULES. Eg
+legitimately happen because of RULES. Eg
f = g Int
where g has arity 2, will have arity 2. But if there's a rewrite rule
g Int --> h
@@ -2347,7 +2347,7 @@ mkDupableCont env (Select _ case_bndr alts se cont)
; (env', dup_cont, nodup_cont) <- prepareCaseCont env alts cont
-- NB: We call prepareCaseCont here. If there is only one
-- alternative, then dup_cont may be big, but that's ok
- -- becuase we push it into the single alternative, and then
+ -- because we push it into the single alternative, and then
-- use mkDupableAlt to turn that simplified alternative into
-- a join point if it's too big to duplicate.
-- And this is important: see Note [Fusing case continuations]
diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs
index afc70f9b9e..ae578bddd4 100644
--- a/compiler/specialise/SpecConstr.lhs
+++ b/compiler/specialise/SpecConstr.lhs
@@ -587,7 +587,7 @@ We get two specialisations:
But perhaps the first one isn't good. After all, we know that tpl_B2 is
a T (I# x) really, because T is strict and Int has one constructor. (We can't
-unbox the strict fields, becuase T is polymorphic!)
+unbox the strict fields, because T is polymorphic!)
%************************************************************************
%* *
@@ -867,7 +867,7 @@ specialiations. Consider
If we specialise $j1 then in each specialisation (as well as the original)
we can specialise $j2, and similarly $j3. Even if we make just *one*
-specialisation of each, becuase we also have the original we'll get 2^n
+specialisation of each, because we also have the original we'll get 2^n
copies of $j3, which is not good.
So when recursively specialising we divide the sc_count by the number of
diff --git a/compiler/specialise/Specialise.lhs b/compiler/specialise/Specialise.lhs
index 04ef404ab2..2406d384e3 100644
--- a/compiler/specialise/Specialise.lhs
+++ b/compiler/specialise/Specialise.lhs
@@ -626,7 +626,7 @@ specImport :: DynFlags
specImport dflags done rb fn calls_for_fn
| fn `elemVarSet` done
= return ([], []) -- No warning. This actually happens all the time
- -- when specialising a recursive function, becuase
+ -- when specialising a recursive function, because
-- the RHS of the specialised function contains a recursive
-- call to the original function
diff --git a/compiler/stgSyn/StgLint.lhs b/compiler/stgSyn/StgLint.lhs
index 852202f5f7..3509a83849 100644
--- a/compiler/stgSyn/StgLint.lhs
+++ b/compiler/stgSyn/StgLint.lhs
@@ -232,7 +232,7 @@ lintStgAlts alts scrut_ty = do
where
-- check ty = checkTys first_ty ty (mkCaseAltMsg alts)
-- We can't check that the alternatives have the
- -- same type, becuase they don't, with unsafeCoerce#
+ -- same type, because they don't, with unsafeCoerce#
lintAlt :: Type -> (AltCon, [Id], [Bool], StgExpr) -> LintM (Maybe Type)
lintAlt _ (DEFAULT, _, _, rhs)
diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index 01240288af..35afff6d5f 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -686,7 +686,7 @@ mkTyVarEqErr dflags ctxt extra ct oriented tv1 ty2
= reportEqErr ctxt extra ct oriented (mkTyVarTy tv1) ty2
-- This *can* happen (Trac #6123, and test T2627b)
-- Consider an ambiguous top-level constraint (a ~ F a)
- -- Not an occurs check, becuase F is a type function.
+ -- Not an occurs check, because F is a type function.
where
occ_check_expand = occurCheckExpand dflags tv1 ty2
k1 = tyVarKind tv1
@@ -866,7 +866,7 @@ mkDictErr ctxt cts
-- Report definite no-instance errors,
-- or (iff there are none) overlap errors
- -- But we report only one of them (hence 'head') becuase they all
+ -- But we report only one of them (hence 'head') because they all
-- have the same source-location origin, to try avoid a cascade
-- of error from one location
; (ctxt, err) <- mk_dict_err ctxt (head (no_inst_cts ++ overlap_cts))
diff --git a/compiler/typecheck/TcExpr.lhs b/compiler/typecheck/TcExpr.lhs
index 60faae75fb..273301314a 100644
--- a/compiler/typecheck/TcExpr.lhs
+++ b/compiler/typecheck/TcExpr.lhs
@@ -536,7 +536,7 @@ handle the *non-updated* fields. Consider:
The result type should be (T a b' c)
not (T a b c), because 'b' *is not* mentioned in a non-updated field
-not (T a b' c'), becuase 'c' *is* mentioned in a non-updated field
+not (T a b' c'), because 'c' *is* mentioned in a non-updated field
NB that it's not good enough to look at just one constructor; we must
look at them all; cf Trac #3219
diff --git a/compiler/typecheck/TcGenDeriv.lhs b/compiler/typecheck/TcGenDeriv.lhs
index 32f3a15c71..917f52392a 100644
--- a/compiler/typecheck/TcGenDeriv.lhs
+++ b/compiler/typecheck/TcGenDeriv.lhs
@@ -500,7 +500,7 @@ unliftedCompare :: PrimOp -> PrimOp
-- Return (if a < b then lt else if a == b then eq else gt)
unliftedCompare lt_op eq_op a_expr b_expr lt eq gt
= nlHsIf (genOpApp a_expr (primOpRdrName lt_op) b_expr) lt $
- -- Test (<) first, not (==), becuase the latter
+ -- Test (<) first, not (==), because the latter
-- is true less often, so putting it first would
-- mean more tests (dynamically)
nlHsIf (genOpApp a_expr (primOpRdrName eq_op) b_expr) eq gt
@@ -690,7 +690,7 @@ instance ... Ix (Foo ...) where
map tag2con_Foo (enumFromTo (I# a#) (I# b#))
}}
- -- Generate code for unsafeIndex, becuase using index leads
+ -- Generate code for unsafeIndex, because using index leads
-- to lots of redundant range tests
unsafeIndex c@(a, b) d
= case (con2tag_Foo d -# con2tag_Foo a) of
diff --git a/compiler/typecheck/TcHsSyn.lhs b/compiler/typecheck/TcHsSyn.lhs
index d6bcc41e3d..3f5524af61 100644
--- a/compiler/typecheck/TcHsSyn.lhs
+++ b/compiler/typecheck/TcHsSyn.lhs
@@ -123,7 +123,7 @@ hsLitType (HsFloatPrim _) = floatPrimTy
hsLitType (HsDoublePrim _) = doublePrimTy
\end{code}
-Overloaded literals. Here mainly becuase it uses isIntTy etc
+Overloaded literals. Here mainly because it uses isIntTy etc
\begin{code}
shortCutLit :: DynFlags -> OverLitVal -> TcType -> Maybe (HsExpr TcId)
diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs
index 69b97ce850..9775ea77b0 100644
--- a/compiler/typecheck/TcHsType.lhs
+++ b/compiler/typecheck/TcHsType.lhs
@@ -961,7 +961,7 @@ and *not* at the inner forall:
f2 :: (forall k. forall (a:k). T k a -> Int) -> Int -- NO!
Reason: same as for HM inference on value level declarations,
we want to infer the most general type. The f2 type signature
-would be *less applicable* than f1, becuase it requires a more
+would be *less applicable* than f1, because it requires a more
polymorphic argument.
Note [Kinds of quantified type variables]
diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs
index b721a4b93b..16a656e32d 100644
--- a/compiler/typecheck/TcInstDcls.lhs
+++ b/compiler/typecheck/TcInstDcls.lhs
@@ -737,7 +737,7 @@ Note that
c) There are several type instance decls for T in the instance
All this is fine. Of course, you can't give any *more* instances
-for (T ty Int) elsewhere, becuase it's an *associated* type.
+for (T ty Int) elsewhere, because it's an *associated* type.
Note [Checking consistent instantiation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -824,7 +824,7 @@ checkConsistentFamInst (Just (clas, mini_env)) flav fam_tc at_tvs at_tys
= case tcMatchTyX at_tv_set subst at_ty inst_ty of
Just subst | all_distinct subst -> return subst
_ -> failWithTc $ wrongATArgErr at_ty inst_ty
- -- No need to instantiate here, becuase the axiom
+ -- No need to instantiate here, because the axiom
-- uses the same type variables as the assocated class
| otherwise
= return subst -- Allow non-type-variable instantiation
@@ -1014,7 +1014,7 @@ mkMethIds sig_fn clas tyvars dfun_ev_vars inst_tys sel_id
= do { let sel_occ = nameOccName sel_name
; meth_name <- newName (mkClassOpAuxOcc sel_occ)
; local_meth_name <- newName sel_occ
- -- Base the local_meth_name on the selector name, becuase
+ -- Base the local_meth_name on the selector name, because
-- type errors from tcInstanceMethodBody come from here
; local_meth_sig <- case lookupHsSig sig_fn sel_name of
diff --git a/compiler/typecheck/TcInteract.lhs b/compiler/typecheck/TcInteract.lhs
index ccb6251f35..fa3ba10333 100644
--- a/compiler/typecheck/TcInteract.lhs
+++ b/compiler/typecheck/TcInteract.lhs
@@ -1200,7 +1200,7 @@ then overwrite the Eq t constraint with a superclass selection!
At first I had a gross hack, whereby I simply did not add superclass constraints
in addWanted, though I did for addGiven and addIrred. This was sub-optimal,
-becuase it lost legitimate superclass sharing, and it still didn't do the job:
+because it lost legitimate superclass sharing, and it still didn't do the job:
I found a very obscure program (now tcrun021) in which improvement meant the
simplifier got two bites a the cherry... so something seemed to be an Stop
first time, but reducible next time.
diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs
index c9c0b5a8fa..2889c53e82 100644
--- a/compiler/typecheck/TcPat.lhs
+++ b/compiler/typecheck/TcPat.lhs
@@ -891,7 +891,7 @@ Here the 'proc (y,z)' binding scopes over the arrow tails but not the
arrow body (e.g 'term'). As things stand (bogusly) all the
constraints from the proc body are gathered together, so constraints
from 'term' will be seen by the tcPat for (y,z). But we must *not*
-bind constraints from 'term' here, becuase the desugarer will not make
+bind constraints from 'term' here, because the desugarer will not make
these bindings scope over 'term'.
The Right Thing is not to confuse these constraints together. But for
@@ -923,7 +923,7 @@ generate the translated term
f = \x' :: (forall a. a->a). let x = x' Int in x 3
From a type-system point of view, this is perfectly fine, but it's *very* seldom useful.
-And it requires a significant amount of code to implement, becuase we need to decorate
+And it requires a significant amount of code to implement, because we need to decorate
the translated pattern with coercion functions (generated from the subsumption check
by tcSub).
diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs
index db4902bbf8..484095d2db 100644
--- a/compiler/typecheck/TcRnDriver.lhs
+++ b/compiler/typecheck/TcRnDriver.lhs
@@ -1289,7 +1289,7 @@ The Ids bound by previous Stmts in GHCi are currently
generator will consider the occurrences to be free rather than
global.
- (b) They retain their Internal names becuase we don't have a suitable
+ (b) They retain their Internal names because we don't have a suitable
Module to name them with. We could revisit this choice.
(c) Their types are tidied. This is important, because :info may ask
diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs
index 50c9d5c3ba..0b28f4db80 100644
--- a/compiler/typecheck/TcRnTypes.lhs
+++ b/compiler/typecheck/TcRnTypes.lhs
@@ -262,7 +262,7 @@ data TcGblEnv
-- ^ @True@ <=> Template Haskell syntax used.
--
-- We need this so that we can generate a dependency on the
- -- Template Haskell package, becuase the desugarer is going
+ -- Template Haskell package, because the desugarer is going
-- to emit loads of references to TH symbols. The reference
-- is implicit rather than explicit, so we have to zap a
-- mutable variable.
diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs
index 8e5ec4111c..b69962f715 100644
--- a/compiler/typecheck/TcSimplify.lhs
+++ b/compiler/typecheck/TcSimplify.lhs
@@ -368,7 +368,7 @@ There are two types we might infer for f:
f :: (?y::Int) => Int -> Int
-At first you might think the first was better, becuase then
+At first you might think the first was better, because then
?y behaves like a free variable of the definition, rather than
having to be passed at each call site. But of course, the WHOLE
IDEA is that ?y should be passed at each call site (that's what
diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs
index 959c0c1847..87f35d8e77 100644
--- a/compiler/typecheck/TcSplice.lhs
+++ b/compiler/typecheck/TcSplice.lhs
@@ -105,7 +105,7 @@ very straightforwardly:
e.g for HsType, rename and kind-check
for HsExpr, rename and type-check
- (The last step is different for decls, becuase they can *only* be
+ (The last step is different for decls, because they can *only* be
top-level: we return the result of step 2.)
Note [How brackets and nested splices are handled]
@@ -669,7 +669,7 @@ defined in another module, because we are going to run it here. It's
a bit like a TH splice:
$(p "stuff")
-However, you can do this in patterns as well as terms. Becuase of this,
+However, you can do this in patterns as well as terms. Because of this,
the splice is run by the *renamer* rather than the type checker.
%************************************************************************
diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs
index 1d0748da8d..954b7345b2 100644
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@ -1236,7 +1236,7 @@ checkValidFamDecl (FamilyDecl { fdLName = lname, fdFlavour = flav })
-- module alpha conversion of the quantified type variables
-- of the constructor.
--
--- Note that we allow existentials to match becuase the
+-- Note that we allow existentials to match because the
-- fields can never meet. E.g
-- data T where
-- T1 { f1 :: b, f2 :: a, f3 ::Int } :: T
@@ -1530,7 +1530,7 @@ Consider this (Trac #4169):
When we typecheck 'ast' we have done the first pass over the class decl
(in tcTyClDecls), but we have not yet typechecked the default-method
-declarations (becuase they can mention value declarations). So we
+declarations (because they can mention value declarations). So we
must bring the default method Ids into scope first (so they can be seen
when typechecking the [d| .. |] quote, and typecheck them later.
diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs
index 638969a258..31a92a8162 100644
--- a/compiler/typecheck/TcUnify.lhs
+++ b/compiler/typecheck/TcUnify.lhs
@@ -109,7 +109,7 @@ namely:
This is not (currently) where deep skolemisation occurs;
matchExpectedFunTys does not skolmise nested foralls in the
-expected type, becuase it expects that to have been done already
+expected type, because it expects that to have been done already
\begin{code}
diff --git a/compiler/types/OptCoercion.lhs b/compiler/types/OptCoercion.lhs
index d01291610e..c85746b60c 100644
--- a/compiler/types/OptCoercion.lhs
+++ b/compiler/types/OptCoercion.lhs
@@ -497,13 +497,13 @@ etaTyConAppCo_maybe tc co
Note [Eta for AppCo]
~~~~~~~~~~~~~~~~~~~~
-Supopse we have
+Suppose we have
g :: s1 t1 ~ s2 t2
Then we can't necessarily make
left g :: s1 ~ s2
right g :: t1 ~ t2
-becuase it's poossible that
+because it's possible that
s1 :: * -> * t1 :: *
s2 :: (*->*) -> * t2 :: * -> *
and in that case (left g) does not have the same
diff --git a/compiler/types/TyCon.lhs b/compiler/types/TyCon.lhs
index c9061e07af..1ad8a297ad 100644
--- a/compiler/types/TyCon.lhs
+++ b/compiler/types/TyCon.lhs
@@ -1167,7 +1167,7 @@ isTupleTyCon :: TyCon -> Bool
-- ^ Does this 'TyCon' represent a tuple?
--
-- NB: when compiling @Data.Tuple@, the tycons won't reply @True@ to
--- 'isTupleTyCon', becuase they are built as 'AlgTyCons'. However they
+-- 'isTupleTyCon', because they are built as 'AlgTyCons'. However they
-- get spat into the interface file as tuple tycons, so I don't think
-- it matters.
isTupleTyCon (TupleTyCon {}) = True
diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs
index f83ed38145..e69de1a44f 100644
--- a/compiler/types/TypeRep.lhs
+++ b/compiler/types/TypeRep.lhs
@@ -747,7 +747,7 @@ pprArrowChain p (arg:args) = maybeParen p FunPrec $
%* *
%************************************************************************
-Tidying is here becuase it has a special case for FlatSkol
+Tidying is here because it has a special case for FlatSkol
\begin{code}
-- | This tidies up a type for printing in an error message, or in