Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
80560e69
Commit
80560e69
authored
Jan 23, 2017
by
Gabor Greif
💬
Browse files
Typos and grammar in manual/comments
parent
2b64e926
Changes
31
Hide whitespace changes
Inline
Side-by-side
aclocal.m4
View file @
80560e69
...
...
@@ -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 vari
b
ale to set to CPP command arguments
# $2 = the varia
b
le to set to CPP command arguments
AC_DEFUN([FP_CPP_CMD_WITH_ARGS],[
dnl ** what cpp to use?
...
...
compiler/basicTypes/BasicTypes.hs
View file @
80560e69
...
...
@@ -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 app
l
ication, or
whether there's an error.
-}
...
...
compiler/basicTypes/Demand.hs
View file @
80560e69
...
...
@@ -1351,7 +1351,7 @@ type DmdShell -- Describes the "outer shell"
=
JointDmd
(
Str
()
)
(
Use
()
)
toCleanDmd
::
Demand
->
Type
->
(
DmdShell
,
CleanDemand
)
-- Spli
c
ts 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 inlin
in
g,
so we'll have inlined 'op' into a cast. So we can bale out in a conservative
way, returning nopDmdType.
...
...
compiler/coreSyn/CorePrep.hs
View file @
80560e69
...
...
@@ -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
...
...
compiler/coreSyn/CoreUnfold.hs
View file @
80560e69
...
...
@@ -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 ar
i
bitrary 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#
...
...
compiler/deSugar/DsBinds.hs
View file @
80560e69
...
...
@@ -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 g
o
rup body, see Note [Desugar Strict binds]
-- later be forced in the binding gr
o
up 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
...
...
compiler/ghci/GHCi.hsc
View file @
80560e69
...
...
@@ -599,7 +599,7 @@ ForeignRef
----------
A ForeignRef is a RemoteRef with a finalizer that will free the
'RemoteRef' when it is gar
gab
e collected. We mostly use ForeignHValue
'RemoteRef' when it is gar
bag
e collected. We mostly use ForeignHValue
on the GHC side.
The finalizer adds the RemoteRef to the iservPendingFrees list in the
...
...
compiler/hsSyn/HsTypes.hs
View file @
80560e69
...
...
@@ -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 /explic
i
tly/ 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 boun
n
d by the HsForAllTy
the explic
i
tly 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 explic
i
tly promoted, for the pretty
-- printer
(
Located
name
)
-- Type variable, type constructor, or data constructor
...
...
compiler/main/GhcMake.hs
View file @
80560e69
...
...
@@ -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.
...
...
compiler/main/HscTypes.hs
View file @
80560e69
...
...
@@ -520,7 +520,7 @@ emptyPackageIfaceTable :: PackageIfaceTable
emptyPackageIfaceTable
=
emptyModuleEnv
pprHPT
::
HomePackageTable
->
SDoc
-- A bit ar
i
bitrary 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
)))
...
...
compiler/main/TidyPgm.hs
View file @
80560e69
...
...
@@ -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 declar
a
tion 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.
...
...
compiler/rename/RnTypes.hs
View file @
80560e69
...
...
@@ -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 app
l
ications 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
...
...
compiler/simplCore/CSE.hs
View file @
80560e69
...
...
@@ -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 des
t
roy 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
...
...
compiler/simplCore/OccurAnal.hs
View file @
80560e69
...
...
@@ -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 inlin
g
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 itera
t
ion the occurrence
analyser chooses f as the loop breaker, so it can freely inlin
e
g. And
again for some reason the simplif
i
er inlines g at its calls in the case
branches, but not in the RHS of f. Then we get
let rec { f = ...g...g...
...
...
compiler/stranal/DmdAnal.hs
View file @
80560e69
...
...
@@ -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 anno
a
tation.
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
...
...
compiler/stranal/WwLib.hs
View file @
80560e69
...
...
@@ -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, dicti
n
oaries can have a lot of fields, so unpacking them can
Moreover, dictio
n
aries can have a lot of fields, so unpacking them can
increase closure sizes.
Conclusion: don't unpack dictionaries.
...
...
compiler/typecheck/TcPat.hs
View file @
80560e69
...
...
@@ -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 no
t
ation has the odd property that it involves
"holes in the scope". For example:
expr :: Arrow a => a () Int
expr = proc (y,z) -> do
...
...
compiler/typecheck/TcRnTypes.hs
View file @
80560e69
...
...
@@ -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-explic
i
t-foralls
-- which is what we want here, since we might be saying
-- type variable 't' is bound by ...
...
...
compiler/typecheck/TcSigs.hs
View file @
80560e69
...
...
@@ -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/signa
u
ture, 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 signa
t
ure is wrong, fail immediately:
* the type sigs may bind type variables, so proceeding without them
can lead to a cascade of errors
...
...
compiler/typecheck/TcSimplify.hs
View file @
80560e69
...
...
@@ -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]
-- cons
t
raints = 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
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment