Skip to content

Commit

Permalink
properly markup <$> in documentation of alterF
Browse files Browse the repository at this point in the history
For both `IntMap` variants, the `<` and `>` did not appear in the
haddock output.

While at it, also in the documentation for the other `alterF` variants
the `<$>` was turned into a hyperlink.
  • Loading branch information
Flupp committed Nov 22, 2022
1 parent aebfe5e commit 6564c5c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion containers/src/Data/IntMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ alter f k Nil = case f Nothing of

-- | \(O(\log n)\). The expression (@'alterF' f k map@) alters the value @x@ at
-- @k@, or absence thereof. 'alterF' can be used to inspect, insert, delete,
-- or update a value in an 'IntMap'. In short : @'lookup' k <$> 'alterF' f k m = f
-- or update a value in an 'IntMap'. In short : @'lookup' k '<$>' 'alterF' f k m = f
-- ('lookup' k m)@.
--
-- Example:
Expand Down
2 changes: 1 addition & 1 deletion containers/src/Data/IntMap/Strict/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ alter f !k t =

-- | \(O(\log n)\). The expression (@'alterF' f k map@) alters the value @x@ at
-- @k@, or absence thereof. 'alterF' can be used to inspect, insert, delete,
-- or update a value in an 'IntMap'. In short : @'lookup' k <$> 'alterF' f k m = f
-- or update a value in an 'IntMap'. In short : @'lookup' k '<$>' 'alterF' f k m = f
-- ('lookup' k m)@.
--
-- Example:
Expand Down
2 changes: 1 addition & 1 deletion containers/src/Data/IntSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ deleteBM _ _ Nil = Nil
-- In short:
--
-- @
-- 'member' x \<$\> 'alterF' f x s = f ('member' x s)
-- 'member' x '<$>' 'alterF' f x s = f ('member' x s)
-- @
--
-- Note: 'alterF' is a variant of the @at@ combinator from "Control.Lens.At".
Expand Down
2 changes: 1 addition & 1 deletion containers/src/Data/Map/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ data AreWeStrict = Strict | Lazy

-- | \(O(\log n)\). The expression (@'alterF' f k map@) alters the value @x@ at
-- @k@, or absence thereof. 'alterF' can be used to inspect, insert, delete,
-- or update a value in a 'Map'. In short: @'lookup' k \<$\> 'alterF' f k m = f
-- or update a value in a 'Map'. In short: @'lookup' k '<$>' 'alterF' f k m = f
-- ('lookup' k m)@.
--
-- Example:
Expand Down
2 changes: 1 addition & 1 deletion containers/src/Data/Map/Strict/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ alter = go

-- | \(O(\log n)\). The expression (@'alterF' f k map@) alters the value @x@ at @k@, or absence thereof.
-- 'alterF' can be used to inspect, insert, delete, or update a value in a 'Map'.
-- In short: @'lookup' k \<$\> 'alterF' f k m = f ('lookup' k m)@.
-- In short: @'lookup' k '<$>' 'alterF' f k m = f ('lookup' k m)@.
--
-- Example:
--
Expand Down
2 changes: 1 addition & 1 deletion containers/src/Data/Set/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ delete = go
-- In short:
--
-- @
-- 'member' x \<$\> 'alterF' f x s = f ('member' x s)
-- 'member' x '<$>' 'alterF' f x s = f ('member' x s)
-- @
--
-- Note that unlike 'insert', 'alterF' will /not/ replace an element equal to
Expand Down

0 comments on commit 6564c5c

Please sign in to comment.