Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
e324e317
Commit
e324e317
authored
Jan 17, 2017
by
Gabor Greif
💬
Browse files
Typos in comments only [ci skip]
parent
2b61f52a
Changes
13
Hide whitespace changes
Inline
Side-by-side
compiler/basicTypes/Demand.hs
View file @
e324e317
...
...
@@ -1539,7 +1539,7 @@ Tricky point: make sure that we analyse in the 'virgin' pass. Consider
In the virgin pass for 'f' we'll give 'f' a very strict (bottom) type.
That might mean that we analyse the sub-expression containing the
E = "...rec g..." stuff in a bottom demand. Suppose we *didn't analyse*
E, but just retuned botType.
E, but just retu
r
ned botType.
Then in the *next* (non-virgin) iteration for 'f', we might analyse E
in a weaker demand, and that will trigger doing a fixpoint iteration
...
...
compiler/coreSyn/CoreUtils.hs
View file @
e324e317
...
...
@@ -1295,7 +1295,7 @@ app_ok primop_ok fun args
-- (which primop_ok will catch), but they ARE OK
-- if the divisor is definitely non-zero.
-- Often there is a literal divisor, and this
-- can get rid of a thunk in an inner loo
o
p
-- can get rid of a thunk in an inner loop
|
otherwise
->
primop_ok
op
-- Check the primop itself
...
...
compiler/coreSyn/MkCore.hs
View file @
e324e317
...
...
@@ -312,7 +312,7 @@ Note [Flattening one-tuples]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This family of functions creates a tuple of variables/expressions/types.
mkCoreTup [e1,e2,e3] = (e1,e2,e3)
What if there is just one variable/expression/type in the agument?
What if there is just one variable/expression/type in the a
r
gument?
We could do one of two things:
* Flatten it out, so that
...
...
compiler/deSugar/DsExpr.hs
View file @
e324e317
...
...
@@ -543,7 +543,7 @@ dsExpr expr@(RecordUpd { rupd_expr = record_expr, rupd_flds = fields
-- It's important to generate the match with matchWrapper,
-- and the right hand sides with applications of the wrapper Id
-- so that everything works when we are doing fancy unboxing on the
-- constructor aguments.
-- constructor a
r
guments.
;
alts
<-
mapM
(
mk_alt
upd_fld_env
)
cons_to_upd
;
([
discrim_var
],
matching_code
)
<-
matchWrapper
RecUpd
Nothing
(
MG
{
mg_alts
=
noLoc
alts
...
...
compiler/prelude/primops.txt.pp
View file @
e324e317
...
...
@@ -2615,7 +2615,7 @@ binder-swap on the case, to give
Now FloatOut might float that v-binding outside the \z. But that is
bad because that might mean x gest evaluated much too early! (CorePrep
adds an eval to a dataToTag# call, to ensure that the agument really is
adds an eval to a dataToTag# call, to ensure that the a
r
gument really is
evaluated; see CorePrep Note [dataToTag magic].)
Solution: make DataToTag into a can_fail primop. That will stop it floating
...
...
compiler/simplCore/OccurAnal.hs
View file @
e324e317
...
...
@@ -931,7 +931,7 @@ It's particularly bad to make a DFun into a loop breaker. See
Note [How instance declarations are translated] in TcInstDcls
We give DFuns a higher score than ordinary CONLIKE things because
if there's a choice we want the DFun to be the non-loo
o
p breker. Eg
if there's a choice we want the DFun to be the non-loop bre
a
ker. Eg
rec { sc = /\ a \$dC. $fBWrap (T a) ($fCT @ a $dC)
...
...
compiler/specialise/SpecConstr.hs
View file @
e324e317
...
...
@@ -210,7 +210,7 @@ This only makes sense if either
b) the type variable 'a' is an argument to f (and hence fs)
Actually, (a) may hold for value arguments too, in which case
we may not want to pass them. Supose 'x' is in scope at f's
we may not want to pass them. Sup
p
ose 'x' is in scope at f's
defn, but xs is not. Then we'd like
f_spec xs = let p = (:) [a] x xs in ....as before....
...
...
compiler/stgSyn/CoreToStg.hs
View file @
e324e317
...
...
@@ -835,7 +835,7 @@ mkStgRhs' con_updateable rhs_fvs bndr binder_info rhs
-- and lots of PAP_enters.
--
-- - in the case where the thunk is top-level, we save building
-- a black hole and futhermore the thunk isn't considered to
-- a black hole and fu
r
thermore the thunk isn't considered to
-- be a CAF any more, so it doesn't appear in any SRTs.
--
-- We do it here, because the arity information is accurate, and we need
...
...
compiler/stranal/DmdAnal.hs
View file @
e324e317
...
...
@@ -1234,7 +1234,7 @@ binders the CPR property. Specifically
| otherwise = x
For $wf2 we are going to unbox the MkT *and*, since it is strict, the
first agument of the MkT; see Note [Add demands for strict constructors].
first a
r
gument of the MkT; see Note [Add demands for strict constructors].
But then we don't want box it up again when returning it! We want
'f2' to have the CPR property, so we give 'x' the CPR property.
...
...
compiler/typecheck/TcRules.hs
View file @
e324e317
...
...
@@ -214,7 +214,7 @@ Consider
f b True = ...
#-}
Here we *must* solve the wanted (Eq a) from the given (Eq a)
resulting from skolemising the agument type of g. So we
resulting from skolemising the a
r
gument type of g. So we
revert to SimplCheck when going under an implication.
...
...
compiler/typecheck/TcSMonad.hs
View file @
e324e317
...
...
@@ -855,7 +855,7 @@ The idea is that
- (K2c): If this holds, we can't pass through this triple infinitely
often, because if we did then fs>=f, fw>=f, hence by (R2)
* either fw>=fs, contradicting K2c
* or fs>=fw; so by the agument in K2b we can't have a loop
* or fs>=fw; so by the a
r
gument in K2b we can't have a loop
- (K2d): if a not in s, we hae no further opportunity to apply the
work item, similar to (K2b)
...
...
docs/core-spec/core-spec.mng
View file @
e324e317
...
...
@@ -242,7 +242,7 @@ In \ottdrulename{Co\_UnivCo}, function $ \textsf{compatibleUnBoxedTys} $ stands
appropriate element of the target tuple;
\end{itemize}
For function implementation see
\coderef
{
coreSyn/CoreLint.lhs
}{
checkTypes
}
.
For futher discussion see
\url
{
https://ghc.haskell.org/trac/ghc/wiki/BadUnsafeCoercions
}
.
For fu
r
ther discussion see
\url
{
https://ghc.haskell.org/trac/ghc/wiki/BadUnsafeCoercions
}
.
\subsection
{
Type constructors
}
...
...
testsuite/tests/typecheck/should_run/tcrun042.hs
View file @
e324e317
{-# LANGUAGE TupleSections, RankNTypes, ImpredicativeTypes #-}
-- Sept 16: This test involves wholesale use of impredicative polymorhism
-- Sept 16: This test involves wholesale use of impredicative polymor
p
hism
-- and I'm amazed it has worked for so long. Anyway it is now
-- failing, which is OK. We don't really suport impredicative
-- failing, which is OK. We don't really sup
p
ort impredicative
-- polymorphism!
--
-- The test was added by Max in 5e8ff849, appretly to test tuple sections
-- The test was added by Max in 5e8ff849, app
a
re
n
tly to test tuple sections
module
Main
where
...
...
@@ -15,4 +15,4 @@ e = (,"Hello" ++ "World",)
dropFunction
::
(
a
,
String
,
forall
c
.
c
->
c
->
c
)
->
(
a
,
String
,
Int
)
dropFunction
(
x
,
y
,
z
)
=
(
x
,
y
,
z
10
20
)
main
=
print
(
dropFunction
$
e
"Meh"
(
flip
const
),
dropFunction
$
e
10
const
)
\ No newline at end of file
main
=
print
(
dropFunction
$
e
"Meh"
(
flip
const
),
dropFunction
$
e
10
const
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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