diff options
author | Brian Wignall <brianwignall@gmail.com> | 2020-01-10 10:47:46 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-12 21:30:08 -0500 |
commit | 0b5ddc7f2c10ee84631dd6cb5f6368afbc389449 (patch) | |
tree | d9a77d5b2c55d75d9ae5b6fa199612315de9d163 /compiler/prelude | |
parent | 350e2b78788d47255d27489dfc62d664498b5de4 (diff) | |
download | haskell-0b5ddc7f2c10ee84631dd6cb5f6368afbc389449.tar.gz |
Fix more typos, via an improved Levenshtein-style corrector
Diffstat (limited to 'compiler/prelude')
-rw-r--r-- | compiler/prelude/PrelInfo.hs | 2 | ||||
-rw-r--r-- | compiler/prelude/PrelRules.hs | 6 | ||||
-rw-r--r-- | compiler/prelude/PrimOp.hs | 2 | ||||
-rw-r--r-- | compiler/prelude/TysWiredIn.hs | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs index 7d2aa3a163..221b034759 100644 --- a/compiler/prelude/PrelInfo.hs +++ b/compiler/prelude/PrelInfo.hs @@ -205,7 +205,7 @@ knownKeysMap = listToUFM [ (nameUnique n, n) | n <- knownKeyNames ] -- GHCi's ':info' command. lookupKnownNameInfo :: Name -> SDoc lookupKnownNameInfo name = case lookupNameEnv knownNamesInfo name of - -- If we do find a doc, we add comment delimeters to make the output + -- If we do find a doc, we add comment delimiters to make the output -- of ':info' valid Haskell. Nothing -> empty Just doc -> vcat [text "{-", doc, text "-}"] diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index c6c27f8ffe..0f8836e3ef 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -722,7 +722,7 @@ Shift.$wgo = \ (w_sCS :: GHC.Prim.Int#) (w1_sCT :: [GHC.Types.Bool]) -> Note the massive shift on line "!!!!". It can't happen, because we've checked that w < 64, but the optimiser didn't spot that. We DO NOT want to constant-fold this! Moreover, if the programmer writes (n `uncheckedShiftL` 9223372036854775807), we -can't constant fold it, but if it gets to the assember we get +can't constant fold it, but if it gets to the assembler we get Error: operand type mismatch for `shl' So the best thing to do is to rewrite the shift with a call to error, @@ -1582,7 +1582,7 @@ match_bitInteger dflags id_unf fn [arg] | Just (LitNumber LitNumInt x _) <- exprIsLiteral_maybe id_unf arg , x >= 0 , x <= (wordSizeInBits dflags - 1) - -- Make sure x is small enough to yield a decently small iteger + -- Make sure x is small enough to yield a decently small integer -- Attempting to construct the Integer for -- (bitInteger 9223372036854775807#) -- would be a bad idea (#14959) @@ -2217,7 +2217,7 @@ Take care if we see something like -1# -> e2 100 -> e3 because there isn't a data constructor with tag -1 or 100. In this case the -out-of-range alterantive is dead code -- we know the range of tags for x. +out-of-range alternative is dead code -- we know the range of tags for x. Hence caseRules returns (AltCon -> Maybe AltCon), with Nothing indicating an alternative that is unreachable. diff --git a/compiler/prelude/PrimOp.hs b/compiler/prelude/PrimOp.hs index 81220140bb..c51304b85d 100644 --- a/compiler/prelude/PrimOp.hs +++ b/compiler/prelude/PrimOp.hs @@ -363,7 +363,7 @@ data dependencies of the state token to enforce write-effect ordering ---------- can_fail ---------------------------- A primop "can_fail" if it can fail with an *unchecked* exception on some elements of its input domain. Main examples: - division (fails on zero demoninator) + division (fails on zero denominator) array indexing (fails if the index is out of bounds) An "unchecked exception" is one that is an outright error, (not diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs index eb9c04fdc9..a1f9f267fe 100644 --- a/compiler/prelude/TysWiredIn.hs +++ b/compiler/prelude/TysWiredIn.hs @@ -680,7 +680,7 @@ Note [How tuples work] See also Note [Known-key names] in PrelNames pretty-print saturated constraint tuples with round parens; see BasicTypes.tupleParens. -* In quite a lot of places things are restrcted just to +* In quite a lot of places things are restricted just to BoxedTuple/UnboxedTuple, and then we used BasicTypes.Boxity to distinguish E.g. tupleTyCon has a Boxity argument @@ -702,7 +702,7 @@ GHC supports both boxed and unboxed one-tuples: single value after CPR analysis - A boxed one-tuple is used by DsUtils.mkSelectorBinds, when there is just one binder -Basically it keeps everythig uniform. +Basically it keeps everything uniform. However the /naming/ of the type/data constructors for one-tuples is a bit odd: @@ -1340,7 +1340,7 @@ boxing_constr_env {- Note [Boxing primitive types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For a handful of primitive types (Int, Char, Word, Flaot, Double), +For a handful of primitive types (Int, Char, Word, Float, Double), we can readily box and an unboxed version (Int#, Char# etc) using the corresponding data constructor. This is useful in a couple of places, notably let-floating -} |