summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2017-01-23 09:38:15 +0100
committerGabor Greif <ggreif@gmail.com>2017-01-23 11:27:22 +0100
commit80560e69ca40abb2c94c4e9fa322365f558a6a8b (patch)
treeba0122a93709a34daeb4db992651e98f3937dc7e /compiler
parent2b64e926a628fb2a3710b0360123ea73331166fe (diff)
downloadhaskell-80560e69ca40abb2c94c4e9fa322365f558a6a8b.tar.gz
Typos and grammar in manual/comments
Diffstat (limited to 'compiler')
-rw-r--r--compiler/basicTypes/BasicTypes.hs2
-rw-r--r--compiler/basicTypes/Demand.hs4
-rw-r--r--compiler/coreSyn/CorePrep.hs2
-rw-r--r--compiler/coreSyn/CoreUnfold.hs2
-rw-r--r--compiler/deSugar/DsBinds.hs4
-rw-r--r--compiler/ghci/GHCi.hsc2
-rw-r--r--compiler/hsSyn/HsTypes.hs6
-rw-r--r--compiler/main/GhcMake.hs2
-rw-r--r--compiler/main/HscTypes.hs2
-rw-r--r--compiler/main/TidyPgm.hs2
-rw-r--r--compiler/rename/RnTypes.hs2
-rw-r--r--compiler/simplCore/CSE.hs2
-rw-r--r--compiler/simplCore/OccurAnal.hs6
-rw-r--r--compiler/stranal/DmdAnal.hs2
-rw-r--r--compiler/stranal/WwLib.hs2
-rw-r--r--compiler/typecheck/TcPat.hs2
-rw-r--r--compiler/typecheck/TcRnTypes.hs2
-rw-r--r--compiler/typecheck/TcSigs.hs4
-rw-r--r--compiler/typecheck/TcSimplify.hs2
-rw-r--r--compiler/types/Coercion.hs2
-rw-r--r--compiler/types/Type.hs2
-rw-r--r--compiler/vectorise/Vectorise.hs2
-rw-r--r--compiler/vectorise/Vectorise/Utils/Base.hs2
23 files changed, 30 insertions, 30 deletions
diff --git a/compiler/basicTypes/BasicTypes.hs b/compiler/basicTypes/BasicTypes.hs
index 37baf2bac6..cf4c9702bc 100644
--- a/compiler/basicTypes/BasicTypes.hs
+++ b/compiler/basicTypes/BasicTypes.hs
@@ -414,7 +414,7 @@ Consider
\begin{verbatim}
a `op1` b `op2` c
\end{verbatim}
-@(compareFixity op1 op2)@ tells which way to arrange appication, or
+@(compareFixity op1 op2)@ tells which way to arrange application, or
whether there's an error.
-}
diff --git a/compiler/basicTypes/Demand.hs b/compiler/basicTypes/Demand.hs
index 1921da307f..c72bf3909d 100644
--- a/compiler/basicTypes/Demand.hs
+++ b/compiler/basicTypes/Demand.hs
@@ -1351,7 +1351,7 @@ type DmdShell -- Describes the "outer shell"
= JointDmd (Str ()) (Use ())
toCleanDmd :: Demand -> Type -> (DmdShell, CleanDemand)
--- Splicts a Demand into its "shell" and the inner "clean demand"
+-- Splits a Demand into its "shell" and the inner "clean demand"
toCleanDmd (JD { sd = s, ud = u }) expr_ty
= (JD { sd = ss, ud = us }, JD { sd = s', ud = u' })
-- See Note [Analyzing with lazy demand and lambdas]
@@ -1764,7 +1764,7 @@ something like: U(AAASAAAAA). Then replace the 'S' by the demand 'd'.
For single-method classes, which are represented by newtypes the signature
of 'op' won't look like U(...), so the splitProdDmd_maybe will fail.
-That's fine: if we are doing strictness analysis we are also doing inling,
+That's fine: if we are doing strictness analysis we are also doing inlining,
so we'll have inlined 'op' into a cast. So we can bale out in a conservative
way, returning nopDmdType.
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs
index fb650f61be..4e4cbb9ff1 100644
--- a/compiler/coreSyn/CorePrep.hs
+++ b/compiler/coreSyn/CorePrep.hs
@@ -1063,7 +1063,7 @@ tryEtaReducePrep _ _ = Nothing
Note [Pin demand info on floats]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-We pin demand info on floated lets so that we can see the one-shot thunks.
+We pin demand info on floated lets, so that we can see the one-shot thunks.
-}
data FloatingBind
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs
index f7e42659c2..574d8418d6 100644
--- a/compiler/coreSyn/CoreUnfold.hs
+++ b/compiler/coreSyn/CoreUnfold.hs
@@ -808,7 +808,7 @@ Conclusion:
Note [Literal integer size]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Literal integers *can* be big (mkInteger [...coefficients...]), but
-need not be (S# n). We just use an aribitrary big-ish constant here
+need not be (S# n). We just use an arbitrary big-ish constant here
so that, in particular, we don't inline top-level defns like
n = S# 5
There's no point in doing so -- any optimisations will see the S#
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index ae18ffdf43..c3704e382e 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -102,7 +102,7 @@ dsTopLHsBinds binds
-- | Desugar all other kind of bindings, Ids of strict binds are returned to
--- later be forced in the binding gorup body, see Note [Desugar Strict binds]
+-- later be forced in the binding group body, see Note [Desugar Strict binds]
dsLHsBinds :: LHsBinds Id -> DsM ([Id], [(Id,CoreExpr)])
dsLHsBinds binds
= do { MASSERT( allBag (not . isUnliftedHsBind . unLoc) binds )
@@ -1052,7 +1052,7 @@ simplOptExpr occurrence-analyses and simplifies the LHS:
(a) Inline any remaining dictionary bindings (which hopefully
occur just once)
- (b) Substitute trivial lets so that they don't get in the way
+ (b) Substitute trivial lets, so that they don't get in the way.
Note that we substitute the function too; we might
have this as a LHS: let f71 = M.f Int in f71
diff --git a/compiler/ghci/GHCi.hsc b/compiler/ghci/GHCi.hsc
index 2354908718..2c6860f126 100644
--- a/compiler/ghci/GHCi.hsc
+++ b/compiler/ghci/GHCi.hsc
@@ -599,7 +599,7 @@ ForeignRef
----------
A ForeignRef is a RemoteRef with a finalizer that will free the
-'RemoteRef' when it is gargabe collected. We mostly use ForeignHValue
+'RemoteRef' when it is garbage collected. We mostly use ForeignHValue
on the GHC side.
The finalizer adds the RemoteRef to the iservPendingFrees list in the
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs
index 7dc3d1217f..7dd34918b1 100644
--- a/compiler/hsSyn/HsTypes.hs
+++ b/compiler/hsSyn/HsTypes.hs
@@ -345,7 +345,7 @@ such as f :: a -> a
A HsSigType is just a HsImplicitBndrs wrapping a LHsType.
* The HsImplicitBndrs binds the /implicitly/ quantified tyvars
- * The LHsType binds the /explictly/ quantified tyvars
+ * The LHsType binds the /explicitly/ quantified tyvars
E.g. For a signature like
f :: forall (a::k). blah
@@ -354,7 +354,7 @@ we get
, hsib_body = HsForAllTy { hst_bndrs = [(a::*)]
, hst_body = blah }
The implicit kind variable 'k' is bound by the HsIB;
-the explictly forall'd tyvar 'a' is bounnd by the HsForAllTy
+the explicitly forall'd tyvar 'a' is bound by the HsForAllTy
-}
mkHsImplicitBndrs :: thing -> HsImplicitBndrs RdrName thing
@@ -433,7 +433,7 @@ data HsType name
{ hst_ctxt :: LHsContext name -- Context C => blah
, hst_body :: LHsType name }
- | HsTyVar Promoted -- whether explictly promoted, for the pretty
+ | HsTyVar Promoted -- whether explicitly promoted, for the pretty
-- printer
(Located name)
-- Type variable, type constructor, or data constructor
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index f74d09755f..94c02d5017 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -171,7 +171,7 @@ warnMissingHomeModules hsc_env mod_graph =
targetid_to_name (TargetModule name) = name
targetid_to_name (TargetFile file _) =
-- We can get a file even if module name in specified in command line
- -- because it can be converted in guessTarget. So lets convert it back.
+ -- because it can be converted in guessTarget. So let's convert it back.
mkModuleName (fst $ splitExtension file)
-- | Describes which modules of the module graph need to be loaded.
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs
index 3a429c02b0..8e6925fe11 100644
--- a/compiler/main/HscTypes.hs
+++ b/compiler/main/HscTypes.hs
@@ -520,7 +520,7 @@ emptyPackageIfaceTable :: PackageIfaceTable
emptyPackageIfaceTable = emptyModuleEnv
pprHPT :: HomePackageTable -> SDoc
--- A bit aribitrary for now
+-- A bit arbitrary for now
pprHPT hpt = pprUDFM hpt $ \hms ->
vcat [ hang (ppr (mi_module (hm_iface hm)))
2 (ppr (md_types (hm_details hm)))
diff --git a/compiler/main/TidyPgm.hs b/compiler/main/TidyPgm.hs
index cdf2aac595..cbf7038187 100644
--- a/compiler/main/TidyPgm.hs
+++ b/compiler/main/TidyPgm.hs
@@ -1411,7 +1411,7 @@ First, Template Haskell. Consider (Trac #2386) this
data T = Yay String
makeOne = [| Yay "Yep" |]
Notice that T is exported abstractly, but makeOne effectively exports it too!
-A module that splices in $(makeOne) will then look for a declartion of Yay,
+A module that splices in $(makeOne) will then look for a declaration of Yay,
so it'd better be there. Hence, brutally but simply, we switch off type
constructor trimming if TH is enabled in this module.
diff --git a/compiler/rename/RnTypes.hs b/compiler/rename/RnTypes.hs
index 421fba5ef0..91d697899a 100644
--- a/compiler/rename/RnTypes.hs
+++ b/compiler/rename/RnTypes.hs
@@ -1121,7 +1121,7 @@ the programmer actually wrote, so you can't find it out from the Name.
Furthermore, the second argument is guaranteed not to be another
operator application. Why? Because the parser parses all
-operator appications left-associatively, EXCEPT negation, which
+operator applications left-associatively, EXCEPT negation, which
we need to handle specially.
Infix types are read in a *right-associative* way, so that
a `op` b `op` c
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index e364c31cdc..f9314bd362 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -236,7 +236,7 @@ all trivial expressions. Consider
case x |> co of (y::Array# Int) { ... }
We do not want to extend the substitution with (y -> x |> co); since y
-is of unlifted type, this would desroy the let/app invariant if (x |>
+is of unlifted type, this would destroy the let/app invariant if (x |>
co) was not ok-for-speculation.
But surely (x |> co) is ok-for-speculation, becasue it's a trivial
diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index c2aa093740..a50fe223f1 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -1311,9 +1311,9 @@ Suppose that GHC decides to inline f in the branches of the case, but
True -> ...g...g.....
False -> ..g..g....
-Now suppose that, for some reason, in the next iteraion the occurrence
-analyser chooses f as the loop breaker, so it can freely inling g. And
-again for some reason the simplifer inlines g at its calls in the case
+Now suppose that, for some reason, in the next iteration the occurrence
+analyser chooses f as the loop breaker, so it can freely inline g. And
+again for some reason the simplifier inlines g at its calls in the case
branches, but not in the RHS of f. Then we get
let rec { f = ...g...g...
diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs
index e7887b94db..79ae20f8fb 100644
--- a/compiler/stranal/DmdAnal.hs
+++ b/compiler/stranal/DmdAnal.hs
@@ -1245,7 +1245,7 @@ binders the CPR property. Specifically
MkT x y | y>0 -> ...
| otherwise -> x
Here we don't have the unboxed 'x' available. Hence the
- is_var_scrut test when making use of the strictness annoatation.
+ is_var_scrut test when making use of the strictness annotation.
Slightly ad-hoc, because even if the scrutinee *is* a variable it
might not be a onre of the arguments to the original function, or a
sub-component thereof. But it's simple, and nothing terrible
diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
index e342ea1abd..9e9f4a143a 100644
--- a/compiler/stranal/WwLib.hs
+++ b/compiler/stranal/WwLib.hs
@@ -551,7 +551,7 @@ BUT if f is strict in the Ord dictionary, we might unpack it, to get
and the type-class specialiser can't specialise that. An example is
Trac #6056.
-Moreover, dictinoaries can have a lot of fields, so unpacking them can
+Moreover, dictionaries can have a lot of fields, so unpacking them can
increase closure sizes.
Conclusion: don't unpack dictionaries.
diff --git a/compiler/typecheck/TcPat.hs b/compiler/typecheck/TcPat.hs
index 036482d723..f3fe3d1655 100644
--- a/compiler/typecheck/TcPat.hs
+++ b/compiler/typecheck/TcPat.hs
@@ -1029,7 +1029,7 @@ addDataConStupidTheta data_con inst_tys
{-
Note [Arrows and patterns]
~~~~~~~~~~~~~~~~~~~~~~~~~~
-(Oct 07) Arrow noation has the odd property that it involves
+(Oct 07) Arrow notation has the odd property that it involves
"holes in the scope". For example:
expr :: Arrow a => a () Int
expr = proc (y,z) -> do
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 6223fd1d89..a998e49632 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -2923,7 +2923,7 @@ pprPatSkolInfo (RealDataCon dc)
= sep [ text "a pattern with constructor:"
, nest 2 $ ppr dc <+> dcolon
<+> pprType (dataConUserType dc) <> comma ]
- -- pprType prints forall's regardless of -fprint-explict-foralls
+ -- pprType prints forall's regardless of -fprint-explicit-foralls
-- which is what we want here, since we might be saying
-- type variable 't' is bound by ...
diff --git a/compiler/typecheck/TcSigs.hs b/compiler/typecheck/TcSigs.hs
index bd72d8aaf1..e26133ed3d 100644
--- a/compiler/typecheck/TcSigs.hs
+++ b/compiler/typecheck/TcSigs.hs
@@ -78,7 +78,7 @@ especially on value bindings. Here's an overview.
the HsType, producing a Type, and wraps it in a CompleteSig, and
extend the type environment with this polymorphic 'f'.
- - For a /partial/signauture, like 'g' above, tcTySig does nothing
+ - For a /partial/signature, like 'g' above, tcTySig does nothing
Instead it just wraps the pieces in a PartialSig, to be handled
later.
@@ -257,7 +257,7 @@ isCompleteHsSig (HsWC { hswc_wcs = wcs }) = null wcs
{- Note [Fail eagerly on bad signatures]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-If a type signaure is wrong, fail immediately:
+If a type signature is wrong, fail immediately:
* the type sigs may bind type variables, so proceeding without them
can lead to a cascade of errors
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index ccc37d5952..c30398d3d1 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -667,7 +667,7 @@ simplifyInfer rhs_tclvl infer_mode sigs name_taus wanteds
-- they had better be unifiable at the outer_tclvl!
-- Example: envt mentions alpha[1]
-- tau_ty = beta[2] -> beta[2]
- -- consraints = alpha ~ [beta]
+ -- constraints = alpha ~ [beta]
-- we don't quantify over beta (since it is fixed by envt)
-- so we must promote it! The inferred type is just
-- f :: beta -> beta
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index 8b6eccb6eb..c7debd4d6f 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -885,7 +885,7 @@ mkCoherenceCo co1 co2 = CoherenceCo co1 co2
mkCoherenceRightCo :: Coercion -> Coercion -> Coercion
mkCoherenceRightCo c1 c2 = mkSymCo (mkCoherenceCo (mkSymCo c1) c2)
--- | An explictly directed synonym of mkCoherenceCo. The second
+-- | An explicitly directed synonym of mkCoherenceCo. The second
-- coercion must be representational.
mkCoherenceLeftCo :: Coercion -> Coercion -> Coercion
mkCoherenceLeftCo = mkCoherenceCo
diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index 818fab7181..b61178665f 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -1516,7 +1516,7 @@ isPredTy ty = go ty []
go_tc tc args
| tc `hasKey` eqPrimTyConKey || tc `hasKey` eqReprPrimTyConKey
= length args == 4 -- ~# and ~R# sadly have result kind #
- -- not Contraint; but we still want
+ -- not Constraint; but we still want
-- isPredTy to reply True.
| otherwise = go_k (tyConKind tc) args
diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs
index 9cc68efe77..d5d24b6b1a 100644
--- a/compiler/vectorise/Vectorise.hs
+++ b/compiler/vectorise/Vectorise.hs
@@ -300,7 +300,7 @@ vectTopBinder var inline expr
= do { -- Vectorise the type attached to the var.
; vty <- vectType (idType var)
- -- If there is a vectorisation declartion for this binding, make sure its type matches
+ -- If there is a vectorisation declaration for this binding, make sure its type matches
; (_, vectDecl) <- lookupVectDecl var
; case vectDecl of
Nothing -> return ()
diff --git a/compiler/vectorise/Vectorise/Utils/Base.hs b/compiler/vectorise/Vectorise/Utils/Base.hs
index 0b8cb7099b..071fab961c 100644
--- a/compiler/vectorise/Vectorise/Utils/Base.hs
+++ b/compiler/vectorise/Vectorise/Utils/Base.hs
@@ -87,7 +87,7 @@ mkClosureTypes = mkBuiltinTyConApps closureTyCon
mkPReprType :: Type -> VM Type
mkPReprType ty = mkBuiltinTyConApp preprTyCon [ty]
--- | Make an appliction of the 'PData' tycon to some argument.
+-- | Make an application of the 'PData' tycon to some argument.
--
mkPDataType :: Type -> VM Type
mkPDataType ty = mkBuiltinTyConApp pdataTyCon [ty]