[commit: ghc] master: Typos in comments (bcb519c)
git at git.haskell.org
git at git.haskell.org
Thu Dec 21 17:37:27 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/bcb519c5f81497bab42304db9ef956d51548479b/ghc
>---------------------------------------------------------------
commit bcb519c5f81497bab42304db9ef956d51548479b
Author: Gabor Greif <ggreif at gmail.com>
Date: Thu Dec 21 18:36:21 2017 +0100
Typos in comments
>---------------------------------------------------------------
bcb519c5f81497bab42304db9ef956d51548479b
compiler/simplCore/CSE.hs | 2 +-
compiler/simplCore/SimplUtils.hs | 4 ++--
compiler/typecheck/TcSimplify.hs | 2 +-
testsuite/tests/typecheck/should_compile/T2497.hs | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 085ca3c..919f61a 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -544,7 +544,7 @@ to transform
W y z -> e2
In the simplifier we use cheapEqExpr, because it is called a lot.
-But here in CSE we use the full eqExpr. After all, two alterantives usually
+But here in CSE we use the full eqExpr. After all, two alternatives usually
differ near the root, so it probably isn't expensive to compare the full
alternative. It seems like the same kind of thing that CSE is supposed
to be doing, which is why I put it here.
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 3f42b03..dfe8b62 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -2093,7 +2093,7 @@ mkCase1 dflags scrut bndr alts_ty alts = mkCase2 dflags scrut bndr alts_ty alts
mkCase2 dflags scrut bndr alts_ty alts
| -- See Note [Scrutinee Constant Folding]
- case alts of -- Not if there is just a DEFAULT alterantive
+ case alts of -- Not if there is just a DEFAULT alternative
[(DEFAULT,_,_)] -> False
_ -> True
, gopt Opt_CaseFolding dflags
@@ -2150,7 +2150,7 @@ mkCase2 dflags scrut bndr alts_ty alts
add_default :: [CoreAlt] -> [CoreAlt]
-- TagToEnum may change a boolean True/False set of alternatives
- -- to LitAlt 0#/1# alterantives. But literal alternatives always
+ -- to LitAlt 0#/1# alternatives. But literal alternatives always
-- have a DEFAULT (I think). So add it.
add_default ((LitAlt {}, bs, rhs) : alts) = (DEFAULT, bs, rhs) : alts
add_default alts = alts
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index af04abe..8001fd6 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -1231,7 +1231,7 @@ Reasons:
fail spuriously, thereby obfuscating the original insoluble error.
Trac #14000 is an example
-I tried an alterantive approach: simply failM, after emitting the
+I tried an alternative approach: simply failM, after emitting the
residual implication constraint; the exception will be caught in
TcBinds.tcPolyBinds, which gives all the binders in the group the type
(forall a. a). But that didn't work with -fdefer-type-errors, because
diff --git a/testsuite/tests/typecheck/should_compile/T2497.hs b/testsuite/tests/typecheck/should_compile/T2497.hs
index 6f76395..55c390d 100644
--- a/testsuite/tests/typecheck/should_compile/T2497.hs
+++ b/testsuite/tests/typecheck/should_compile/T2497.hs
@@ -6,7 +6,7 @@ foo x = x
{-# NOINLINE [1] foo #-}
-- Trac #2497; test should compile without language
--- pragmas to swith on the forall
+-- pragmas to switch on the forall
{-# RULES "id" forall (x :: a). foo x = x #-}
More information about the ghc-commits
mailing list