From fd1a7d351ba528dfcada745a1b8167642d599602 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Sat, 10 Mar 2018 05:12:06 +0100 Subject: [PATCH] Fix Documentation Typos (#545) In the Haddocks, fix a bunch of infix functions with unescaped backticks that got formatted all wrong. --- Data/IntMap/Internal.hs | 4 ++-- Data/IntSet/Internal.hs | 2 +- Data/Map/Internal.hs | 8 ++++---- Data/Map/Strict/Internal.hs | 2 +- Data/Sequence.hs | 2 +- Data/Sequence/Internal.hs | 2 +- Data/Set/Internal.hs | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Data/IntMap/Internal.hs b/Data/IntMap/Internal.hs index 51ec47f55..1bad02b41 100644 --- a/Data/IntMap/Internal.hs +++ b/Data/IntMap/Internal.hs @@ -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 @@ -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 diff --git a/Data/IntSet/Internal.hs b/Data/IntSet/Internal.hs index 0540e7af7..8a0b08e87 100644 --- a/Data/IntSet/Internal.hs +++ b/Data/IntSet/Internal.hs @@ -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) diff --git a/Data/Map/Internal.hs b/Data/Map/Internal.hs index 7d2ecd2cb..4506e1bb1 100644 --- a/Data/Map/Internal.hs +++ b/Data/Map/Internal.hs @@ -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 @@ -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 diff --git a/Data/Map/Strict/Internal.hs b/Data/Map/Strict/Internal.hs index 3905e1ef0..756582b5a 100644 --- a/Data/Map/Strict/Internal.hs +++ b/Data/Map/Strict/Internal.hs @@ -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. diff --git a/Data/Sequence.hs b/Data/Sequence.hs index 863399b47..3e4c7055d 100644 --- a/Data/Sequence.hs +++ b/Data/Sequence.hs @@ -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) diff --git a/Data/Sequence/Internal.hs b/Data/Sequence/Internal.hs index 9c811c5df..b945b1270 100644 --- a/Data/Sequence/Internal.hs +++ b/Data/Sequence/Internal.hs @@ -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: diff --git a/Data/Set/Internal.hs b/Data/Set/Internal.hs index cd1bb2e06..9f6171687 100644 --- a/Data/Set/Internal.hs +++ b/Data/Set/Internal.hs @@ -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) @@ -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: @@ -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: --