From 554aedab646075e12e53b44df04bcfbccbe03a73 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Tue, 16 Dec 2014 12:07:10 +0100 Subject: Convert `/Since: .../` to new `@since ...` syntax Starting with Haddock 2.16 there's a new built-in support for since-annotations Note: This exposes a bug in the `@since` implementation (see e.g. `Data.Bits`) --- libraries/base/Data/OldList.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libraries/base/Data/OldList.hs') diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index eb9f1ccedf..137ce42150 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -231,7 +231,7 @@ infix 5 \\ -- comment to fool cpp: https://www.haskell.org/ghc/docs/latest/html/ -- > dropWhileEnd isSpace "foo bar" == "foo bar" -- > dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined -- --- /Since: 4.5.0.0/ +-- @since 4.5.0.0 dropWhileEnd :: (a -> Bool) -> [a] -> [a] dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) [] @@ -974,7 +974,7 @@ rqpart cmp x (y:ys) rle rgt r = -- input list. This is called the decorate-sort-undecorate paradigm, or -- Schwartzian transform. -- --- /Since: 4.8.0.0/ +-- @since 4.8.0.0 sortOn :: Ord b => (a -> b) -> [a] -> [a] sortOn f = map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x)) -- cgit v1.2.1