Skip to content

Commit fd1a7d3

Browse files
steffahntreeowl
authored andcommitted
Fix Documentation Typos (#545)
In the Haddocks, fix a bunch of infix functions with unescaped backticks that got formatted all wrong.
1 parent e622f78 commit fd1a7d3

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

Data/IntMap/Internal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ differenceWithKey f m1 m2
10791079
-- | /O(n+m)/. Remove all the keys in a given set from a map.
10801080
--
10811081
-- @
1082-
-- m `withoutKeys` s = 'filterWithKey' (\k _ -> k `'IntSet.notMember'` s) m
1082+
-- m \`withoutKeys\` s = 'filterWithKey' (\k _ -> k ``IntSet.notMember`` s) m
10831083
-- @
10841084
--
10851085
-- @since 0.5.8
@@ -1157,7 +1157,7 @@ intersection m1 m2
11571157
-- | /O(n+m)/. The restriction of a map to the keys in a set.
11581158
--
11591159
-- @
1160-
-- m `restrictKeys` s = 'filterWithKey' (\k _ -> k `'IntSet.member'` s) m
1160+
-- m \`restrictKeys\` s = 'filterWithKey' (\k _ -> k ``IntSet.member`` s) m
11611161
-- @
11621162
--
11631163
-- @since 0.5.8

Data/IntSet/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ subsetCmp Nil Nil = EQ
643643
subsetCmp Nil _ = LT
644644

645645
-- | /O(n+m)/. Is this a subset?
646-
-- @(s1 `isSubsetOf` s2)@ tells whether @s1@ is a subset of @s2@.
646+
-- @(s1 \`isSubsetOf\` s2)@ tells whether @s1@ is a subset of @s2@.
647647

648648
isSubsetOf :: IntSet -> IntSet -> Bool
649649
isSubsetOf t1@(Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)

Data/Map/Internal.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,8 +1899,8 @@ difference t1 (Bin _ k _ l2 r2) = case split k t1 of
18991899
-- | /O(m*log(n\/m + 1)), m <= n/. Remove all keys in a 'Set' from a 'Map'.
19001900
--
19011901
-- @
1902-
-- m `'withoutKeys'` s = 'filterWithKey' (\k _ -> k `'Set.notMember'` s) m
1903-
-- m `'withoutKeys'` s = m `'difference'` 'fromSet' (const ()) s
1902+
-- m \`withoutKeys\` s = 'filterWithKey' (\k _ -> k ``Set.notMember`` s) m
1903+
-- m \`withoutKeys\` s = m ``difference`` 'fromSet' (const ()) s
19041904
-- @
19051905
--
19061906
-- @since 0.5.8
@@ -1981,8 +1981,8 @@ intersection t1@(Bin _ k x l1 r1) t2
19811981
-- found in a 'Set'.
19821982
--
19831983
-- @
1984-
-- m `'restrictKeys'` s = 'filterWithKey' (\k _ -> k `'Set.member'` s) m
1985-
-- m `'restrictKeys'` s = m `'intersect' 'fromSet' (const ()) s
1984+
-- m \`restrictKeys\` s = 'filterWithKey' (\k _ -> k ``Set.member`` s) m
1985+
-- m \`restrictKeys\` s = m ``intersect`` 'fromSet' (const ()) s
19861986
-- @
19871987
--
19881988
-- @since 0.5.8

Data/Map/Strict/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ mapWithKey f (Bin sx kx x l r) =
13791379
#endif
13801380

13811381
-- | /O(n)/.
1382-
-- @'traverseWithKey' f m == 'fromList' <$> 'traverse' (\(k, v) -> (\v' -> v' `seq` (k,v')) <$> f k v) ('toList' m)@
1382+
-- @'traverseWithKey' f m == 'fromList' <$> 'traverse' (\(k, v) -> (\v' -> v' \`seq\` (k,v')) <$> f k v) ('toList' m)@
13831383
-- That is, it behaves much like a regular 'traverse' except that the traversing
13841384
-- function also has access to the key associated with a value and the values are
13851385
-- forced before they are installed in the result map.

Data/Sequence.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
--
6666
-- but
6767
--
68-
-- @ (1 :<| undefined) \`index\` 0 = undefined @
68+
-- @ (1 :<| undefined) ``index`` 0 = undefined @
6969
--
7070
-- Sequences may also be compared to immutable
7171
-- [arrays](https://hackage.haskell.org/package/array)

Data/Sequence/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4358,7 +4358,7 @@ instance MonadZip Seq where
43584358
-- | Unzip a sequence of pairs.
43594359
--
43604360
-- @
4361-
-- unzip ps = ps `'seq'` ('fmap' 'fst' ps) ('fmap' 'snd' ps)
4361+
-- unzip ps = ps ``seq`` ('fmap' 'fst' ps) ('fmap' 'snd' ps)
43624362
-- @
43634363
--
43644364
-- Example:

Data/Set/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ isProperSubsetOf s1 s2
600600

601601

602602
-- | /O(n+m)/. Is this a subset?
603-
-- @(s1 `isSubsetOf` s2)@ tells whether @s1@ is a subset of @s2@.
603+
-- @(s1 \`isSubsetOf\` s2)@ tells whether @s1@ is a subset of @s2@.
604604
isSubsetOf :: Ord a => Set a -> Set a -> Bool
605605
isSubsetOf t1 t2
606606
= (size t1 <= size t2) && (isSubsetOfX t1 t2)
@@ -1691,7 +1691,7 @@ splitRoot orig =
16911691
-- | Calculate the power set of a set: the set of all its subsets.
16921692
--
16931693
-- @
1694-
-- t `member` powerSet s == t `isSubsetOf` s
1694+
-- t ``member`` powerSet s == t ``isSubsetOf`` s
16951695
-- @
16961696
--
16971697
-- Example:
@@ -1746,7 +1746,7 @@ instance Monoid (MergeSet a) where
17461746

17471747
-- | Calculate the disjoin union of two sets.
17481748
--
1749-
-- @ disjointUnion xs ys = map Left xs `union` map Right ys @
1749+
-- @ disjointUnion xs ys = map Left xs ``union`` map Right ys @
17501750
--
17511751
-- Example:
17521752
--

0 commit comments

Comments
 (0)