Commit bcb519c5 authored by Gabor Greif's avatar Gabor Greif 💬
Browse files

Typos in comments

parent f5cf9d1a
...@@ -544,7 +544,7 @@ to transform ...@@ -544,7 +544,7 @@ to transform
W y z -> e2 W y z -> e2
In the simplifier we use cheapEqExpr, because it is called a lot. 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 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 alternative. It seems like the same kind of thing that CSE is supposed
to be doing, which is why I put it here. to be doing, which is why I put it here.
......
...@@ -2093,7 +2093,7 @@ mkCase1 dflags scrut bndr alts_ty alts = mkCase2 dflags scrut bndr alts_ty alts ...@@ -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 mkCase2 dflags scrut bndr alts_ty alts
| -- See Note [Scrutinee Constant Folding] | -- 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 [(DEFAULT,_,_)] -> False
_ -> True _ -> True
, gopt Opt_CaseFolding dflags , gopt Opt_CaseFolding dflags
...@@ -2150,7 +2150,7 @@ mkCase2 dflags scrut bndr alts_ty alts ...@@ -2150,7 +2150,7 @@ mkCase2 dflags scrut bndr alts_ty alts
add_default :: [CoreAlt] -> [CoreAlt] add_default :: [CoreAlt] -> [CoreAlt]
-- TagToEnum may change a boolean True/False set of alternatives -- 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. -- have a DEFAULT (I think). So add it.
add_default ((LitAlt {}, bs, rhs) : alts) = (DEFAULT, bs, rhs) : alts add_default ((LitAlt {}, bs, rhs) : alts) = (DEFAULT, bs, rhs) : alts
add_default alts = alts add_default alts = alts
......
...@@ -1231,7 +1231,7 @@ Reasons: ...@@ -1231,7 +1231,7 @@ Reasons:
fail spuriously, thereby obfuscating the original insoluble error. fail spuriously, thereby obfuscating the original insoluble error.
Trac #14000 is an example 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 residual implication constraint; the exception will be caught in
TcBinds.tcPolyBinds, which gives all the binders in the group the type 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 (forall a. a). But that didn't work with -fdefer-type-errors, because
......
...@@ -6,7 +6,7 @@ foo x = x ...@@ -6,7 +6,7 @@ foo x = x
{-# NOINLINE [1] foo #-} {-# NOINLINE [1] foo #-}
-- Trac #2497; test should compile without language -- 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 #-} {-# RULES "id" forall (x :: a). foo x = x #-}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment