summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-21 21:03:29 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-25 18:26:44 +0100
commite6191d39680351bc69dfb379386c4c5273971030 (patch)
tree9652e70935ff5460d9d0a1d3d6fb173ef5a844ee /compiler/GHC/Core/Opt
parent80daefce4ec1169ac3ef0552b8600c71527d84c2 (diff)
downloadhaskell-e6191d39680351bc69dfb379386c4c5273971030.tar.gz
Fix typos
Diffstat (limited to 'compiler/GHC/Core/Opt')
-rw-r--r--compiler/GHC/Core/Opt/Arity.hs2
-rw-r--r--compiler/GHC/Core/Opt/ConstantFold.hs4
-rw-r--r--compiler/GHC/Core/Opt/SetLevels.hs6
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs2
-rw-r--r--compiler/GHC/Core/Opt/SpecConstr.hs2
-rw-r--r--compiler/GHC/Core/Opt/Specialise.hs2
6 files changed, 9 insertions, 9 deletions
diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs
index c0a5f79b11..9d2e873b56 100644
--- a/compiler/GHC/Core/Opt/Arity.hs
+++ b/compiler/GHC/Core/Opt/Arity.hs
@@ -1912,7 +1912,7 @@ collectBindersPushingCo e
Note [collectBindersPushingCo]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We just look for coercions of form
- <type> # w -> blah
+ <type> % w -> blah
(and similarly for foralls) to keep this function simple. We could do
more elaborate stuff, but it'd involve substitution etc.
diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs
index cce8830a97..919520cb83 100644
--- a/compiler/GHC/Core/Opt/ConstantFold.hs
+++ b/compiler/GHC/Core/Opt/ConstantFold.hs
@@ -1410,7 +1410,7 @@ this case
Here x contains an invalid shift and consequently we would like to rewrite it
as follows:
- let x = I# (error "invalid shift)
+ let x = I# (error "invalid shift")
in ...
This was originally done in the fix to #16449 but this breaks the let/app
@@ -3305,7 +3305,7 @@ Instead, we deal with turning one branch into DEFAULT in GHC.Core.Opt.Simplify.U
Note [caseRules for dataToTag]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-See also Note [dataToTag#] in primpops.txt.pp
+See also Note [dataToTag#] in primops.txt.pp
We want to transform
case dataToTag x of
diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs
index 084e8430e6..c5ad4e4b1c 100644
--- a/compiler/GHC/Core/Opt/SetLevels.hs
+++ b/compiler/GHC/Core/Opt/SetLevels.hs
@@ -55,9 +55,9 @@
This can only work if @wild@ is an unrestricted binder. Indeed, even with the
extended typing rule (in the linter) for case expressions, if
- case x of wild # 1 { p -> e}
+ case x of wild % 1 { p -> e}
is well-typed, then
- case x of wild # 1 { p -> e[wild\x] }
+ case x of wild % 1 { p -> e[wild\x] }
is only well-typed if @e[wild\x] = e@ (that is, if @wild@ is not used in @e@
at all). In which case, it is, of course, pointless to do the substitution
anyway. So for a linear binder (and really anything which isn't unrestricted),
@@ -1594,7 +1594,7 @@ initialEnv float_lams binds
, le_env = emptyVarEnv }
where
in_scope_toplvl = emptyInScopeSet `extendInScopeSetList` bindersOfBinds binds
- -- The Simplifier (see Note [Glomming] in GHC.Core.Opt.Occuranal) and
+ -- The Simplifier (see Note [Glomming] in GHC.Core.Opt.OccurAnal) and
-- the specialiser (see Note [Top level scope] in GHC.Core.Opt.Specialise)
-- may both produce top-level bindings where an early binding refers
-- to a later one. So here we put all the top-level binders in scope before
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index 1398bfd6e7..0e945043b6 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -45,7 +45,7 @@ import GHC.Core.FVs ( mkRuleInfo )
import GHC.Core.Rules ( lookupRule, getRules, initRuleOpts )
import GHC.Core.Multiplicity
-import GHC.Types.Literal ( litIsLifted ) --, mkLitInt ) -- temporalily commented out. See #8326
+import GHC.Types.Literal ( litIsLifted ) --, mkLitInt ) -- temporarily commented out. See #8326
import GHC.Types.SourceText
import GHC.Types.Id
import GHC.Types.Id.Make ( seqId )
diff --git a/compiler/GHC/Core/Opt/SpecConstr.hs b/compiler/GHC/Core/Opt/SpecConstr.hs
index 6f82257148..03cce88623 100644
--- a/compiler/GHC/Core/Opt/SpecConstr.hs
+++ b/compiler/GHC/Core/Opt/SpecConstr.hs
@@ -2003,7 +2003,7 @@ Consider (#14270) a call like
in ... f (K @(a |> co)) ...
where 'co' is a coercion variable not in scope at f's definition site.
-If we aren't caereful we'll get
+If we aren't careful we'll get
let $sf a co = e (K @(a |> co))
RULE "SC:f" forall a co. f (K @(a |> co)) = $sf a co
diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs
index 7071932e2a..f158041fc8 100644
--- a/compiler/GHC/Core/Opt/Specialise.hs
+++ b/compiler/GHC/Core/Opt/Specialise.hs
@@ -1000,7 +1000,7 @@ of an imported function 'g', which we want to specialise in turn,
and similarly specialising 'g' might expose a new call to 'h'.
We track the stack of enclosing functions. So when specialising 'h' we
-haev a specImport call stack of [g,f]. We do this for two reasons:
+have a specImport call stack of [g,f]. We do this for two reasons:
* Note [Warning about missed specialisations]
* Note [Avoiding recursive specialisation]