Skip to content

Commit

Permalink
Fix Documentation Typos (#545)
Browse files Browse the repository at this point in the history
In the Haddocks, fix a bunch of infix functions with unescaped backticks that got formatted all wrong.
  • Loading branch information
steffahn authored and treeowl committed Mar 10, 2018
1 parent e622f78 commit fd1a7d3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Data/IntMap/Internal.hs
Expand Up @@ -1079,7 +1079,7 @@ differenceWithKey f m1 m2
-- | /O(n+m)/. Remove all the keys in a given set from a map.
--
-- @
-- m `withoutKeys` s = 'filterWithKey' (\k _ -> k `'IntSet.notMember'` s) m
-- m \`withoutKeys\` s = 'filterWithKey' (\k _ -> k ``IntSet.notMember`` s) m
-- @
--
-- @since 0.5.8
Expand Down Expand Up @@ -1157,7 +1157,7 @@ intersection m1 m2
-- | /O(n+m)/. The restriction of a map to the keys in a set.
--
-- @
-- m `restrictKeys` s = 'filterWithKey' (\k _ -> k `'IntSet.member'` s) m
-- m \`restrictKeys\` s = 'filterWithKey' (\k _ -> k ``IntSet.member`` s) m
-- @
--
-- @since 0.5.8
Expand Down
2 changes: 1 addition & 1 deletion Data/IntSet/Internal.hs
Expand Up @@ -643,7 +643,7 @@ subsetCmp Nil Nil = EQ
subsetCmp Nil _ = LT

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

isSubsetOf :: IntSet -> IntSet -> Bool
isSubsetOf t1@(Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)
Expand Down
8 changes: 4 additions & 4 deletions Data/Map/Internal.hs
Expand Up @@ -1899,8 +1899,8 @@ difference t1 (Bin _ k _ l2 r2) = case split k t1 of
-- | /O(m*log(n\/m + 1)), m <= n/. Remove all keys in a 'Set' from a 'Map'.
--
-- @
-- m `'withoutKeys'` s = 'filterWithKey' (\k _ -> k `'Set.notMember'` s) m
-- m `'withoutKeys'` s = m `'difference'` 'fromSet' (const ()) s
-- m \`withoutKeys\` s = 'filterWithKey' (\k _ -> k ``Set.notMember`` s) m
-- m \`withoutKeys\` s = m ``difference`` 'fromSet' (const ()) s
-- @
--
-- @since 0.5.8
Expand Down Expand Up @@ -1981,8 +1981,8 @@ intersection t1@(Bin _ k x l1 r1) t2
-- found in a 'Set'.
--
-- @
-- m `'restrictKeys'` s = 'filterWithKey' (\k _ -> k `'Set.member'` s) m
-- m `'restrictKeys'` s = m `'intersect' 'fromSet' (const ()) s
-- m \`restrictKeys\` s = 'filterWithKey' (\k _ -> k ``Set.member`` s) m
-- m \`restrictKeys\` s = m ``intersect`` 'fromSet' (const ()) s
-- @
--
-- @since 0.5.8
Expand Down
2 changes: 1 addition & 1 deletion Data/Map/Strict/Internal.hs
Expand Up @@ -1379,7 +1379,7 @@ mapWithKey f (Bin sx kx x l r) =
#endif

-- | /O(n)/.
-- @'traverseWithKey' f m == 'fromList' <$> 'traverse' (\(k, v) -> (\v' -> v' `seq` (k,v')) <$> f k v) ('toList' m)@
-- @'traverseWithKey' f m == 'fromList' <$> 'traverse' (\(k, v) -> (\v' -> v' \`seq\` (k,v')) <$> f k v) ('toList' m)@
-- That is, it behaves much like a regular 'traverse' except that the traversing
-- function also has access to the key associated with a value and the values are
-- forced before they are installed in the result map.
Expand Down
2 changes: 1 addition & 1 deletion Data/Sequence.hs
Expand Up @@ -65,7 +65,7 @@
--
-- but
--
-- @ (1 :<| undefined) \`index\` 0 = undefined @
-- @ (1 :<| undefined) ``index`` 0 = undefined @
--
-- Sequences may also be compared to immutable
-- [arrays](https://hackage.haskell.org/package/array)
Expand Down
2 changes: 1 addition & 1 deletion Data/Sequence/Internal.hs
Expand Up @@ -4358,7 +4358,7 @@ instance MonadZip Seq where
-- | Unzip a sequence of pairs.
--
-- @
-- unzip ps = ps `'seq'` ('fmap' 'fst' ps) ('fmap' 'snd' ps)
-- unzip ps = ps ``seq`` ('fmap' 'fst' ps) ('fmap' 'snd' ps)
-- @
--
-- Example:
Expand Down
6 changes: 3 additions & 3 deletions Data/Set/Internal.hs
Expand Up @@ -600,7 +600,7 @@ isProperSubsetOf s1 s2


-- | /O(n+m)/. Is this a subset?
-- @(s1 `isSubsetOf` s2)@ tells whether @s1@ is a subset of @s2@.
-- @(s1 \`isSubsetOf\` s2)@ tells whether @s1@ is a subset of @s2@.
isSubsetOf :: Ord a => Set a -> Set a -> Bool
isSubsetOf t1 t2
= (size t1 <= size t2) && (isSubsetOfX t1 t2)
Expand Down Expand Up @@ -1691,7 +1691,7 @@ splitRoot orig =
-- | Calculate the power set of a set: the set of all its subsets.
--
-- @
-- t `member` powerSet s == t `isSubsetOf` s
-- t ``member`` powerSet s == t ``isSubsetOf`` s
-- @
--
-- Example:
Expand Down Expand Up @@ -1746,7 +1746,7 @@ instance Monoid (MergeSet a) where

-- | Calculate the disjoin union of two sets.
--
-- @ disjointUnion xs ys = map Left xs `union` map Right ys @
-- @ disjointUnion xs ys = map Left xs ``union`` map Right ys @
--
-- Example:
--
Expand Down

0 comments on commit fd1a7d3

Please sign in to comment.