Skip to content

Commit 42c6134

Browse files
author
fluesvamp
authored
typos (#472)
1 parent 6a0fed1 commit 42c6134

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Diff for: Data/HashMap/Internal.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ lookup' h k m = case lookupRecordCollision# h k m of
652652
(# | (# a, _i #) #) -> Just a
653653
{-# INLINE lookup' #-}
654654

655-
-- The result of a lookup, keeping track of if a hash collision occured.
655+
-- The result of a lookup, keeping track of if a hash collision occurred.
656656
-- If a collision did not occur then it will have the Int value (-1).
657657
data LookupRes a = Absent | Present a !Int
658658

@@ -2258,7 +2258,7 @@ fromList = List.foldl' (\ m (k, v) -> unsafeInsert k v m) empty
22582258
-- > = fromList [('a', [3, 1]), ('b', [2])]
22592259
--
22602260
-- Note that the lists in the resulting map contain elements in reverse order
2261-
-- from their occurences in the original list.
2261+
-- from their occurrences in the original list.
22622262
--
22632263
-- More generally, duplicate entries are accumulated as follows;
22642264
-- this matters when @f@ is not commutative or not associative.

Diff for: Data/HashMap/Internal/Array.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ updateM ary idx b =
351351
where !count = length ary
352352
{-# INLINE updateM #-}
353353

354-
-- | \(O(n)\) Update the element at the given positio in this array, by
354+
-- | \(O(n)\) Update the element at the given position in this array, by
355355
-- applying a function to it. Evaluates the element to WHNF before
356356
-- inserting it into the array.
357357
updateWith' :: Array e -> Int -> (e -> e) -> Array e

Diff for: Data/HashMap/Internal/List.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import Data.Maybe (fromMaybe)
3232
import Data.Semigroup ((<>))
3333
#endif
3434

35-
-- Note: previous implemenation isPermutation = null (as // bs)
35+
-- Note: previous implementation isPermutation = null (as // bs)
3636
-- was O(n^2) too.
3737
--
3838
-- This assumes lists are of equal length

Diff for: Data/HashMap/Internal/Strict.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ fromList = List.foldl' (\ m (k, !v) -> HM.unsafeInsert k v m) HM.empty
668668
-- > = fromList [('a', [3, 1]), ('b', [2])]
669669
--
670670
-- Note that the lists in the resulting map contain elements in reverse order
671-
-- from their occurences in the original list.
671+
-- from their occurrences in the original list.
672672
--
673673
-- More generally, duplicate entries are accumulated as follows;
674674
-- this matters when @f@ is not commutative or not associative.

Diff for: docs/developer-guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ would be no reason for it to exist, given that its functionality is a strict
1717
subset of ordered containers. This might seem obvious, but the author has
1818
rejected several proposals in the past (e.g. to switch to higher quality but
1919
slower hash functions) that would have made unordered-containers too slow to
20-
motivate its existance.
20+
motivate its existence.
2121

2222
## A note on hash functions
2323

@@ -87,7 +87,7 @@ data HashMap k v
8787
| Collision !Hash !(A.Array (Leaf k v))
8888
```
8989

90-
Here's a quick overview in order of simplicty:
90+
Here's a quick overview in order of simplicity:
9191

9292
* `Empty` -- The empty map.
9393
* `Leaf` -- A key-value pair.

Diff for: tests/Strictness.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pFromListWithKeyStrict f =
9898
-- argument, just the first argument, just the second argument,
9999
-- or both arguments are bottom. It would be quite tempting to
100100
-- just use Maybe A -> Maybe A -> Maybe A, but that would not
101-
-- necessarily be continous.
101+
-- necessarily be continuous.
102102
pFromListWithValueResultStrict :: [(Key, Maybe A)]
103103
-> Fun (Maybe A, Maybe A) A
104104
-> Fun (Maybe A, Maybe A) Bool

0 commit comments

Comments
 (0)