Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,323
Issues
4,323
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
367
Merge Requests
367
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
80560e69
Commit
80560e69
authored
Jan 23, 2017
by
Gabor Greif
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typos and grammar in manual/comments
parent
2b64e926
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
39 additions
and
39 deletions
+39
-39
aclocal.m4
aclocal.m4
+1
-1
compiler/basicTypes/BasicTypes.hs
compiler/basicTypes/BasicTypes.hs
+1
-1
compiler/basicTypes/Demand.hs
compiler/basicTypes/Demand.hs
+2
-2
compiler/coreSyn/CorePrep.hs
compiler/coreSyn/CorePrep.hs
+1
-1
compiler/coreSyn/CoreUnfold.hs
compiler/coreSyn/CoreUnfold.hs
+1
-1
compiler/deSugar/DsBinds.hs
compiler/deSugar/DsBinds.hs
+2
-2
compiler/ghci/GHCi.hsc
compiler/ghci/GHCi.hsc
+1
-1
compiler/hsSyn/HsTypes.hs
compiler/hsSyn/HsTypes.hs
+3
-3
compiler/main/GhcMake.hs
compiler/main/GhcMake.hs
+1
-1
compiler/main/HscTypes.hs
compiler/main/HscTypes.hs
+1
-1
compiler/main/TidyPgm.hs
compiler/main/TidyPgm.hs
+1
-1
compiler/rename/RnTypes.hs
compiler/rename/RnTypes.hs
+1
-1
compiler/simplCore/CSE.hs
compiler/simplCore/CSE.hs
+1
-1
compiler/simplCore/OccurAnal.hs
compiler/simplCore/OccurAnal.hs
+3
-3
compiler/stranal/DmdAnal.hs
compiler/stranal/DmdAnal.hs
+1
-1
compiler/stranal/WwLib.hs
compiler/stranal/WwLib.hs
+1
-1
compiler/typecheck/TcPat.hs
compiler/typecheck/TcPat.hs
+1
-1
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcRnTypes.hs
+1
-1
compiler/typecheck/TcSigs.hs
compiler/typecheck/TcSigs.hs
+2
-2
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSimplify.hs
+1
-1
compiler/types/Coercion.hs
compiler/types/Coercion.hs
+1
-1
compiler/types/Type.hs
compiler/types/Type.hs
+1
-1
compiler/vectorise/Vectorise.hs
compiler/vectorise/Vectorise.hs
+1
-1
compiler/vectorise/Vectorise/Utils/Base.hs
compiler/vectorise/Vectorise/Utils/Base.hs
+1
-1
docs/users_guide/safe_haskell.rst
docs/users_guide/safe_haskell.rst
+2
-2
libraries/base/GHC/ForeignPtr.hs
libraries/base/GHC/ForeignPtr.hs
+1
-1
testsuite/tests/deriving/should_fail/drvfail-functor2.hs
testsuite/tests/deriving/should_fail/drvfail-functor2.hs
+1
-1
testsuite/tests/printer/Ppr006.hs
testsuite/tests/printer/Ppr006.hs
+1
-1
testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs
testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs
+1
-1
testsuite/tests/typecheck/should_compile/T4361.hs
testsuite/tests/typecheck/should_compile/T4361.hs
+1
-1
testsuite/tests/typecheck/should_fail/tcfail143.hs
testsuite/tests/typecheck/should_fail/tcfail143.hs
+1
-1
No files found.
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
ba
le to set to CPP command arguments
# $2 = the vari
ab
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
or
up body, see Note [Desugar Strict binds]
-- later be forced in the binding g
ro
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 explic
tly forall'd tyvar 'a' is boun
nd by the HsForAllTy
the explic
itly forall'd tyvar 'a' is bou
nd 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
no
aries can have a lot of fields, so unpacking them can
Moreover, dicti
on
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
...
...
compiler/types/Coercion.hs
View file @
80560e69
...
...
@@ -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 explic
i
tly directed synonym of mkCoherenceCo. The second
-- coercion must be representational.
mkCoherenceLeftCo
::
Coercion
->
Coercion
->
Coercion
mkCoherenceLeftCo
=
mkCoherenceCo
...
...
compiler/types/Type.hs
View file @
80560e69
...
...
@@ -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 Con
s
traint; but we still want
-- isPredTy to reply True.
|
otherwise
=
go_k
(
tyConKind
tc
)
args
...
...
compiler/vectorise/Vectorise.hs
View file @
80560e69
...
...
@@ -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 declar
a
tion for this binding, make sure its type matches
;
(
_
,
vectDecl
)
<-
lookupVectDecl
var
;
case
vectDecl
of
Nothing
->
return
()
...
...
compiler/vectorise/Vectorise/Utils/Base.hs
View file @
80560e69
...
...
@@ -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 applic
a
tion of the 'PData' tycon to some argument.
--
mkPDataType
::
Type
->
VM
Type
mkPDataType
ty
=
mkBuiltinTyConApp
pdataTyCon
[
ty
]
...
...
docs/users_guide/safe_haskell.rst
View file @
80560e69
...
...
@@ -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
...
...
libraries/base/GHC/ForeignPtr.hs
View file @
80560e69
...
...
@@ -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 prima
r
y 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
...
...
testsuite/tests/deriving/should_fail/drvfail-functor2.hs
View file @
80560e69
...
...
@@ -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-con
s
traints on 'a'
data
Eq
a
=>
StupidConstraint
a
=
StupidType
a
deriving
(
Functor
)
...
...
testsuite/tests/printer/Ppr006.hs
View file @
80560e69
...
...
@@ -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, som
e
thing different happens:
- *Playlist* start playing the song under the cursor
...
...
testsuite/tests/safeHaskell/overlapping/SH_Overlap8.hs
View file @
80560e69
...
...
@@ -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 explic
i
tly depend on `SH_Overlap8_A`
-- since that's where the type-class `C` with function `f` is defined.
--
-- Question: Safe or Unsafe? Safe
...
...
testsuite/tests/typecheck/should_compile/T4361.hs
View file @
80560e69
...
...
@@ -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 con
s
traint (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
...
...
testsuite/tests/typecheck/should_fail/tcfail143.hs
View file @
80560e69
...
...
@@ -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 declar
a
tions
- and only then do pairwise improvement between constraints
I've implemented that, and indeed it improves the result.
...
...
Write
Preview
Markdown
is supported
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