diff options
| author | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2013-09-23 11:28:36 +0200 |
|---|---|---|
| committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2013-09-23 11:33:20 +0200 |
| commit | be3b84f3c020e6b147ec9b581d257f88b8774ff0 (patch) | |
| tree | 41057f031b142d94d4d43f4ed816282ab4be9fc8 | |
| parent | e19ae5df6c05e5fd3c691623e041b136dc5cafe9 (diff) | |
| download | haskell-be3b84f3c020e6b147ec9b581d257f88b8774ff0.tar.gz | |
Typos
| -rw-r--r-- | compiler/coreSyn/CoreSyn.lhs | 4 | ||||
| -rw-r--r-- | compiler/coreSyn/CoreUtils.lhs | 4 | ||||
| -rw-r--r-- | compiler/rename/RnBinds.lhs | 2 | ||||
| -rw-r--r-- | compiler/rename/RnNames.lhs | 4 | ||||
| -rw-r--r-- | compiler/simplCore/SimplUtils.lhs | 4 | ||||
| -rw-r--r-- | compiler/stranal/DmdAnal.lhs | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs index baa28bc0cc..99ea8daef5 100644 --- a/compiler/coreSyn/CoreSyn.lhs +++ b/compiler/coreSyn/CoreSyn.lhs @@ -388,13 +388,13 @@ is fine, and has type Bool. This is one reason we need a type on the case expression: if the alternatives are empty we can't get the type from the alternatives! I'll write this case (error Int "Hello") of Bool {} -with the return type just before the alterantives. +with the return type just before the alternatives. Here's another example: data T f :: T -> Bool f = \(x:t). case x of Bool {} -Since T has no data constructors, the case alterantives are of course +Since T has no data constructors, the case alternatives are of course empty. However note that 'x' is not bound to a visbily-bottom value; it's the *type* that tells us it's going to diverge. Its a bit of a degnerate situation but we do NOT want to replace diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs index 06f167cce0..f717049974 100644 --- a/compiler/coreSyn/CoreUtils.lhs +++ b/compiler/coreSyn/CoreUtils.lhs @@ -695,7 +695,7 @@ Should we inline 'v' at its use site inside the loop? At the moment we do. I experimented with saying that case are *not* work-free, but that increased allocation slightly. It's a fairly small effect, and at the moment we go for the slightly more aggressive version which treats -(case x of ....) as work-free if the alterantives are. +(case x of ....) as work-free if the alternatives are. Note [exprIsCheap] See also Note [Interaction of exprIsCheap and lone variables] @@ -984,7 +984,7 @@ app_ok primop_ok fun args ----------------------------- altsAreExhaustive :: [Alt b] -> Bool --- True <=> the case alterantives are definiely exhaustive +-- True <=> the case alternatives are definiely exhaustive -- False <=> they may or may not be altsAreExhaustive [] = False -- Should not happen diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index c30760d7ad..5843692dfb 100644 --- a/compiler/rename/RnBinds.lhs +++ b/compiler/rename/RnBinds.lhs @@ -828,7 +828,7 @@ rnMatch' ctxt rnBody match@(Match pats maybe_rhs_sig grhss) ; return (Match pats' Nothing grhss', grhss_fvs) }} emptyCaseErr :: HsMatchContext Name -> SDoc -emptyCaseErr ctxt = hang (ptext (sLit "Empty list of alterantives in") <+> pp_ctxt) +emptyCaseErr ctxt = hang (ptext (sLit "Empty list of alternatives in") <+> pp_ctxt) 2 (ptext (sLit "Use EmptyCase to allow this")) where pp_ctxt = case ctxt of diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 058dbb8a45..bb4cc63191 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -206,8 +206,8 @@ rnImportDecl this_mod (warnRedundantSourceImport imp_mod_name) when (mod_safe && not (safeImportsOn dflags)) $ addErrAt loc (ptext (sLit "safe import can't be used as Safe Haskell isn't on!") - $+$ ptext (sLit $ "please enable Safe Haskell through either" - ++ "Safe, Trustwrothy or Unsafe")) + $+$ ptext (sLit $ "please enable Safe Haskell through either " + ++ "Safe, Trustworthy or Unsafe")) let imp_mod = mi_module iface warns = mi_warns iface diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs index ab4937e8f3..5cf82ed3ac 100644 --- a/compiler/simplCore/SimplUtils.lhs +++ b/compiler/simplCore/SimplUtils.lhs @@ -1553,7 +1553,7 @@ prepareAlts scrut case_bndr' alts _ -> [] \end{code} -Note [Combine identical alterantives] +Note [Combine identical alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If several alternatives are identical, merge them into a single DEFAULT alternative. I've occasionally seen this @@ -1598,7 +1598,7 @@ defeats combineIdenticalAlts (see Trac #7360). \begin{code} combineIdenticalAlts :: OutId -> [InAlt] -> SimplM [InAlt] --- See Note [Combine identical alterantives] +-- See Note [Combine identical alternatives] combineIdenticalAlts case_bndr ((_con1,bndrs1,rhs1) : con_alts) | all isDeadBinder bndrs1 -- Remember the default , length filtered_alts < length con_alts -- alternative comes first diff --git a/compiler/stranal/DmdAnal.lhs b/compiler/stranal/DmdAnal.lhs index 98c4083ddf..5d34caeb47 100644 --- a/compiler/stranal/DmdAnal.lhs +++ b/compiler/stranal/DmdAnal.lhs @@ -831,7 +831,7 @@ Notice that j' is not a let-no-escape any more. However this means in turn that the *enclosing* function may be CPR'd (via the returned Justs). But in the case of -sums, there may be Nothing alterantives; and that messes +sums, there may be Nothing alternatives; and that messes up the sum-type CPR. Conclusion: only do this for products. It's still not |
