Skip to content

Commit 848286d

Browse files
authored
Minor documentation fixes (#927)
* Add `@since` annotations for the `MonadZip` instances for `Data.Sequence` and `Data.Tree`. * Fix Haddock markup.
1 parent 9f4a936 commit 848286d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

containers/src/Data/Sequence/Internal.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4659,6 +4659,8 @@ splitMapNode splt f s (Node3 ns a b c) = Node3 ns (f first a) (f second b) (f th
46594659
-- | @ 'mzipWith' = 'zipWith' @
46604660
--
46614661
-- @ 'munzip' = 'unzip' @
4662+
--
4663+
-- @since 0.5.10.1
46624664
instance MonadZip Seq where
46634665
mzipWith = zipWith
46644666
munzip = unzip

containers/src/Data/Tree.hs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ foldlMap1 f g = -- Use a lambda to allow inlining with two arguments
302302
instance NFData a => NFData (Tree a) where
303303
rnf (Node x ts) = rnf x `seq` rnf ts
304304

305+
-- | @since 0.5.10.1
305306
instance MonadZip Tree where
306307
mzipWith f (Node a as) (Node b bs)
307308
= Node (f a b) (mzipWith (mzipWith f) as bs)
@@ -489,8 +490,9 @@ unfoldForestM f = Prelude.mapM (unfoldTreeM f)
489490
--
490491
-- See 'unfoldTree' for more info.
491492
--
492-
-- Implemented using an algorithm adapted from /Breadth-First Numbering: Lessons
493-
-- from a Small Exercise in Algorithm Design/, by Chris Okasaki, /ICFP'00/.
493+
-- Implemented using an algorithm adapted from
494+
-- /Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design/,
495+
-- by Chris Okasaki, /ICFP'00/.
494496
unfoldTreeM_BF :: Monad m => (b -> m (a, [b])) -> b -> m (Tree a)
495497
unfoldTreeM_BF f b = liftM getElement $ unfoldForestQ f (singleton b)
496498
where
@@ -502,8 +504,9 @@ unfoldTreeM_BF f b = liftM getElement $ unfoldForestQ f (singleton b)
502504
--
503505
-- See 'unfoldForest' for more info.
504506
--
505-
-- Implemented using an algorithm adapted from /Breadth-First Numbering: Lessons
506-
-- from a Small Exercise in Algorithm Design/, by Chris Okasaki, /ICFP'00/.
507+
-- Implemented using an algorithm adapted from
508+
-- /Breadth-First Numbering: Lessons from a Small Exercise in Algorithm Design/,
509+
-- by Chris Okasaki, /ICFP'00/.
507510
unfoldForestM_BF :: Monad m => (b -> m (a, [b])) -> [b] -> m ([Tree a])
508511
unfoldForestM_BF f = liftM toList . unfoldForestQ f . fromList
509512

0 commit comments

Comments
 (0)