Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Fumiaki Kinoshita
GHC
Commits
017d11e0
Commit
017d11e0
authored
Nov 14, 2016
by
Gabor Greif
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typos in comments, notes and manual
parent
642adec4
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
15 additions
and
15 deletions
+15
-15
compiler/coreSyn/CoreUtils.hs
compiler/coreSyn/CoreUtils.hs
+1
-1
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcExpr.hs
+2
-2
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcFlatten.hs
+1
-1
compiler/typecheck/TcGenDeriv.hs
compiler/typecheck/TcGenDeriv.hs
+1
-1
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcInstDcls.hs
+1
-1
compiler/typecheck/TcMType.hs
compiler/typecheck/TcMType.hs
+1
-1
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSimplify.hs
+2
-2
compiler/typecheck/TcUnify.hs
compiler/typecheck/TcUnify.hs
+1
-1
compiler/vectorise/Vectorise.hs
compiler/vectorise/Vectorise.hs
+1
-1
docs/users_guide/glasgow_exts.rst
docs/users_guide/glasgow_exts.rst
+3
-3
testsuite/tests/typecheck/should_fail/tcfail174.hs
testsuite/tests/typecheck/should_fail/tcfail174.hs
+1
-1
No files found.
compiler/coreSyn/CoreUtils.hs
View file @
017d11e0
...
@@ -2091,7 +2091,7 @@ rhsIsStatic :: Platform
...
@@ -2091,7 +2091,7 @@ rhsIsStatic :: Platform
--
--
-- (ii) We treat partial applications as redexes, because in fact we
-- (ii) We treat partial applications as redexes, because in fact we
-- make a thunk for them that runs and builds a PAP
-- make a thunk for them that runs and builds a PAP
-- at run-time. The only appliations that are treated as
-- at run-time. The only appli
c
ations that are treated as
-- static are *saturated* applications of constructors.
-- static are *saturated* applications of constructors.
-- We used to try to be clever with nested structures like this:
-- We used to try to be clever with nested structures like this:
...
...
compiler/typecheck/TcExpr.hs
View file @
017d11e0
...
@@ -306,7 +306,7 @@ People write
...
@@ -306,7 +306,7 @@ People write
so much, where
so much, where
runST :: (forall s. ST s a) -> a
runST :: (forall s. ST s a) -> a
that I have finally given in and written a special type-checking
that I have finally given in and written a special type-checking
rule just for saturated appliations of ($).
rule just for saturated appli
c
ations of ($).
* Infer the type of the first argument
* Infer the type of the first argument
* Decompose it; should be of form (arg2_ty -> res_ty),
* Decompose it; should be of form (arg2_ty -> res_ty),
where arg2_ty might be a polytype
where arg2_ty might be a polytype
...
@@ -1938,7 +1938,7 @@ getFixedTyVars upd_fld_occs univ_tvs cons
...
@@ -1938,7 +1938,7 @@ getFixedTyVars upd_fld_occs univ_tvs cons
-- Universally-quantified tyvars that
-- Universally-quantified tyvars that
-- appear in any of the *implicit*
-- appear in any of the *implicit*
-- arguments to the constructor are fixed
-- arguments to the constructor are fixed
-- See Note [Implict type sharing]
-- See Note [Implic
i
t type sharing]
fixed_tys
=
[
ty
|
(
fl
,
ty
)
<-
zip
flds
arg_tys
fixed_tys
=
[
ty
|
(
fl
,
ty
)
<-
zip
flds
arg_tys
,
not
(
flLabel
fl
`
elem
`
upd_fld_occs
)]
,
not
(
flLabel
fl
`
elem
`
upd_fld_occs
)]
...
...
compiler/typecheck/TcFlatten.hs
View file @
017d11e0
...
@@ -432,7 +432,7 @@ Assuming NOT rewriting wanteds with wanteds
...
@@ -432,7 +432,7 @@ Assuming NOT rewriting wanteds with wanteds
[G] V a ~ f_aBg
[G] V a ~ f_aBg
Worklist includes [W] Scalar fmv_aBi ~ fmv_aBk
Worklist includes [W] Scalar fmv_aBi ~ fmv_aBk
fmv_aBi, fmv_aBk are flatten unifica
i
ton variables
fmv_aBi, fmv_aBk are flatten unificat
i
on variables
Work item: [W] V fsk_aBh ~ fmv_aBi
Work item: [W] V fsk_aBh ~ fmv_aBi
...
...
compiler/typecheck/TcGenDeriv.hs
View file @
017d11e0
...
@@ -1591,7 +1591,7 @@ a polytype. E.g.
...
@@ -1591,7 +1591,7 @@ a polytype. E.g.
The type checker checks this code, and it currently requires
The type checker checks this code, and it currently requires
-XImpredicativeTypes to permit that polymorphic type instantiation,
-XImpredicativeTypes to permit that polymorphic type instantiation,
so
e
w have to switch that flag on locally in TcDeriv.genInst.
so w
e
have to switch that flag on locally in TcDeriv.genInst.
See #8503 for more discussion.
See #8503 for more discussion.
...
...
compiler/typecheck/TcInstDcls.hs
View file @
017d11e0
...
@@ -941,7 +941,7 @@ Notice that
...
@@ -941,7 +941,7 @@ Notice that
be usused in some, but dead-code elimination will drop it.)
be usused in some, but dead-code elimination will drop it.)
We achieve this by putting the the evidence variable for the overall
We achieve this by putting the the evidence variable for the overall
instance implica
i
ton into the AbsBinds for each method/superclass.
instance implicat
i
on into the AbsBinds for each method/superclass.
Hence the 'dfun_ev_binds' passed into tcMethods and tcSuperClasses.
Hence the 'dfun_ev_binds' passed into tcMethods and tcSuperClasses.
(And that in turn is why the abs_ev_binds field of AbBinds is a
(And that in turn is why the abs_ev_binds field of AbBinds is a
[TcEvBinds] rather than simply TcEvBinds.
[TcEvBinds] rather than simply TcEvBinds.
...
...
compiler/typecheck/TcMType.hs
View file @
017d11e0
...
@@ -379,7 +379,7 @@ checkingExpType err et = pprPanic "checkingExpType" (text err $$ ppr et)
...
@@ -379,7 +379,7 @@ checkingExpType err et = pprPanic "checkingExpType" (text err $$ ppr et)
tauifyExpType
::
ExpType
->
TcM
ExpType
tauifyExpType
::
ExpType
->
TcM
ExpType
-- ^ Turn a (Infer hole) type into a (Check alpha),
-- ^ Turn a (Infer hole) type into a (Check alpha),
-- where alpha is a fresh unifica
i
ton variable
-- where alpha is a fresh unificat
i
on variable
tauifyExpType
(
Check
ty
)
=
return
(
Check
ty
)
-- No-op for (Check ty)
tauifyExpType
(
Check
ty
)
=
return
(
Check
ty
)
-- No-op for (Check ty)
tauifyExpType
(
Infer
inf_res
)
=
do
{
ty
<-
inferResultToType
inf_res
tauifyExpType
(
Infer
inf_res
)
=
do
{
ty
<-
inferResultToType
inf_res
;
return
(
Check
ty
)
}
;
return
(
Check
ty
)
}
...
...
compiler/typecheck/TcSimplify.hs
View file @
017d11e0
...
@@ -1553,8 +1553,8 @@ of progress. Trac #8474 is a classic example:
...
@@ -1553,8 +1553,8 @@ of progress. Trac #8474 is a classic example:
exponentially many) iterations!
exponentially many) iterations!
Conclusion: we should call solveNestedImplications only if we did
Conclusion: we should call solveNestedImplications only if we did
some unifiction in solveSimpleWanteds; because that's the only way
some unific
a
tion in solveSimpleWanteds; because that's the only way
we'll get more Givens (a unifica
i
ton is like adding a Given) to
we'll get more Givens (a unificat
i
on is like adding a Given) to
allow the implication to make progress.
allow the implication to make progress.
-}
-}
...
...
compiler/typecheck/TcUnify.hs
View file @
017d11e0
...
@@ -999,7 +999,7 @@ with constraints
...
@@ -999,7 +999,7 @@ with constraints
Here we abstract over the '->' inside the forall, in case that
Here we abstract over the '->' inside the forall, in case that
is subject to an equality constraint from a GADT match.
is subject to an equality constraint from a GADT match.
Note that we kept the outer (->) bec
u
ase that's part of
Note that we kept the outer (->) beca
u
se that's part of
the polymorphic "shape". And becauuse of impredicativity,
the polymorphic "shape". And becauuse of impredicativity,
GADT matches can't give equalities that affect polymorphic
GADT matches can't give equalities that affect polymorphic
shape.
shape.
...
...
compiler/vectorise/Vectorise.hs
View file @
017d11e0
...
@@ -275,7 +275,7 @@ vectTopBind b@(Rec binds)
...
@@ -275,7 +275,7 @@ vectTopBind b@(Rec binds)
-- Add a vectorised binding to an imported top-level variable that has a VECTORISE pragma
-- Add a vectorised binding to an imported top-level variable that has a VECTORISE pragma
-- in this module.
-- in this module.
--
--
-- REST
I
RCTION: Currently, we cannot use the pragma for mutually recursive definitions.
-- RESTR
I
CTION: Currently, we cannot use the pragma for mutually recursive definitions.
--
--
vectImpBind
::
(
Id
,
CoreExpr
)
->
VM
CoreBind
vectImpBind
::
(
Id
,
CoreExpr
)
->
VM
CoreBind
vectImpBind
(
var
,
expr
)
vectImpBind
(
var
,
expr
)
...
...
docs/users_guide/glasgow_exts.rst
View file @
017d11e0
...
@@ -9493,13 +9493,13 @@ your ``forall``\s explicitly. Indeed, doing so is strongly advised for
...
@@ -9493,13 +9493,13 @@ your ``forall``\s explicitly. Indeed, doing so is strongly advised for
rank
-
2
types
.
rank
-
2
types
.
Sometimes
there
*
is
*
no
"outermost level"
,
in
which
case
no
Sometimes
there
*
is
*
no
"outermost level"
,
in
which
case
no
implicit
quanification
happens
:
::
implicit
quan
t
ification
happens
:
::
data
PackMap
a
b
s
t
=
PackMap
(
Monad
f
=>
(
a
->
f
b
)
->
s
->
f
t
)
data
PackMap
a
b
s
t
=
PackMap
(
Monad
f
=>
(
a
->
f
b
)
->
s
->
f
t
)
This
is
rejected
because
there
is
no
"outermost level"
for
the
types
on
the
RHS
This
is
rejected
because
there
is
no
"outermost level"
for
the
types
on
the
RHS
(
it
would
obviously
be
terrible
to
add
extra
parameters
to
``
PackMap
``),
(
it
would
obviously
be
terrible
to
add
extra
parameters
to
``
PackMap
``),
so
no
implicit
quantifica
i
ton
happens
,
and
the
declaration
is
rejected
so
no
implicit
quantificat
i
on
happens
,
and
the
declaration
is
rejected
(
with
"``f`` is out of scope"
).
Solution
:
use
an
explicit
``
forall
``:
::
(
with
"``f`` is out of scope"
).
Solution
:
use
an
explicit
``
forall
``:
::
data
PackMap
a
b
s
t
=
PackMap
(
forall
f
.
Monad
f
=>
(
a
->
f
b
)
->
s
->
f
t
)
data
PackMap
a
b
s
t
=
PackMap
(
forall
f
.
Monad
f
=>
(
a
->
f
b
)
->
s
->
f
t
)
...
@@ -11590,7 +11590,7 @@ optionally had by adding ``!`` in front of a variable.
...
@@ -11590,7 +11590,7 @@ optionally had by adding ``!`` in front of a variable.
In
ordinary
Haskell
,
``
f
``
is
lazy
in
its
argument
and
hence
in
In
ordinary
Haskell
,
``
f
``
is
lazy
in
its
argument
and
hence
in
``
x
``;
and
``
g
``
is
strict
in
its
argument
and
hence
also
strict
in
``
x
``;
and
``
g
``
is
strict
in
its
argument
and
hence
also
strict
in
``
x
``.
With
``
Strict
``,
both
become
strict
because
``
f
``
's argument
``
x
``.
With
``
Strict
``,
both
become
strict
because
``
f
``
's argument
gets an implict bang.
gets an implic
i
t bang.
.. _strict-modularity:
.. _strict-modularity:
...
...
testsuite/tests/typecheck/should_fail/tcfail174.hs
View file @
017d11e0
...
@@ -8,7 +8,7 @@ data Capture a = Base a
...
@@ -8,7 +8,7 @@ data Capture a = Base a
g
::
Capture
(
forall
a
.
a
->
a
)
g
::
Capture
(
forall
a
.
a
->
a
)
g
=
Base
id
-- Fails; need a rigid signature on 'id'
g
=
Base
id
-- Fails; need a rigid signature on 'id'
-- Actually, succeeds now, with visible type application
-- Actually, succeeds now, with visible type application
-- Disagree: should not succeed bec
u
ase it instantiates
-- Disagree: should not succeed beca
u
se it instantiates
-- Base with a forall type
-- Base with a forall type
-- This function should definitely be rejected, with or without type signature
-- This function should definitely be rejected, with or without type signature
...
...
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