Commit 80560e69 authored by Gabor Greif's avatar Gabor Greif 💬

Typos and grammar in manual/comments

parent 2b64e926
......@@ -2134,7 +2134,7 @@ AC_DEFUN([MAYBE_OVERRIDE_STAGE0],[
# sets CPP command and its arguments
#
# $1 = the variable to set to CPP command
# $2 = the varibale to set to CPP command arguments
# $2 = the variable to set to CPP command arguments
AC_DEFUN([FP_CPP_CMD_WITH_ARGS],[
dnl ** what cpp to use?
......
......@@ -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.
-}
......
......@@ -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.
......
......@@ -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
......
......@@ -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#
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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.
......
......@@ -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)))
......
......@@ -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.
......
......@@ -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
......
......@@ -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
......
......@@ -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...
......
......@@ -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
......
......@@ -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.
......
......@@ -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
......
......@@ -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 ...
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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 ()
......
......@@ -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]
......
......@@ -85,7 +85,7 @@ due to the presence of functions like ``unsafePerformIO``. Safe Haskell
gives users enough guarantees about the type system to allow them to
build such secure systems.
As an example, lets define an interface for a plugin system where the
As an example, let's define an interface for a plugin system where the
plugin authors are untrusted, possibly malicious third-parties. We do
this by restricting the plugin interface to pure functions or to a
restricted ``IO`` monad that we have defined. The restricted ``IO``
......@@ -137,7 +137,7 @@ We then compile the ``Danger`` plugin using the new Safe Haskell
runMe :: RIO ()
runMe = ...
Before going into the Safe Haskell details, lets point out some of the
Before going into the Safe Haskell details, let's point out some of the
reasons this security mechanism would fail without Safe Haskell:
- The design attempts to restrict the operations that ``Danger`` can perform by
......
......@@ -72,7 +72,7 @@ import GHC.Ptr ( Ptr(..), FunPtr(..) )
--
data ForeignPtr a = ForeignPtr Addr# ForeignPtrContents
-- The Addr# in the ForeignPtr object is intentionally stored
-- separately from the finalizer. The primay aim of the
-- separately from the finalizer. The primary aim of the
-- representation is to make withForeignPtr efficient; in fact,
-- withForeignPtr should be just as efficient as unpacking a
-- Ptr, and multiple withForeignPtrs can share an unpacked
......
......@@ -14,7 +14,7 @@ newtype OnSecondArg a = OnSecondArg (Either a a)
newtype NoArguments = NoArguments Int
deriving (Functor)
-- Derive Functor on a type with extra stupid-contraints on 'a'
-- Derive Functor on a type with extra stupid-constraints on 'a'
data Eq a => StupidConstraint a = StupidType a
deriving (Functor)
......
......@@ -191,7 +191,7 @@ commands = [
-- Library: add song to playlist and play it
-- Browse: either add song to playlist and play it, or :move-in
, command "default-action" [help|
depending on the item under the cursor, somthing different happens:
depending on the item under the cursor, something different happens:
- *Playlist* start playing the song under the cursor
......
......@@ -2,7 +2,7 @@
{-# LANGUAGE FlexibleInstances #-}
-- | Overlapping instances, but with a single parameter type-class and no
-- orphans. So `SH_Overlap8` decided to explictly depend on `SH_Overlap8_A`
-- orphans. So `SH_Overlap8` decided to explicitly depend on `SH_Overlap8_A`
-- since that's where the type-class `C` with function `f` is defined.
--
-- Question: Safe or Unsafe? Safe
......
......@@ -22,7 +22,7 @@ moduloBasisx p = let x :: ()
x = upLinSolvRing p
in ()
-- This is very delicate! The contraint (LinSolvRing (Pol a))
-- This is very delicate! The constraint (LinSolvRing (Pol a))
-- arises in the RHS of x, and we must be careful *not* to simplify
-- it with the instance declaration "XXXX", else we get the
-- unsatisfiable constraint (EuclideanRing a). In effect, the
......
......@@ -86,7 +86,7 @@ changes the order.
Hmm. Perhaps a good improvement strategy would be:
- first do improvement against the instance declartions
- first do improvement against the instance declarations
- and only then do pairwise improvement between constraints
I've implemented that, and indeed it improves the result.
......
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