summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Tennie <sven.tennie@gmail.com>2019-04-23 01:35:33 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-05-03 13:40:36 -0400
commit4186b4100380fae1b91cae0d2fbb224ad70dc5f3 (patch)
tree805bc1d309777a39f803633e9e6c8b1e0f5b45ae
parentebfa35284741fca47719f531f0996261441f75b0 (diff)
downloadhaskell-4186b4100380fae1b91cae0d2fbb224ad70dc5f3.tar.gz
Typeset Big-O complexities with Tex-style notation (#16090)
Use `\min` instead of `min` to typeset it as an operator.
-rw-r--r--libraries/base/Data/OldList.hs4
-rw-r--r--libraries/base/GHC/List.hs4
2 files changed, 4 insertions, 4 deletions
diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs
index 035a969e27..ac5cbddb58 100644
--- a/libraries/base/Data/OldList.hs
+++ b/libraries/base/Data/OldList.hs
@@ -241,7 +241,7 @@ infix 5 \\ -- comment to fool cpp: https://downloads.haskell.org/~ghc/latest/doc
dropWhileEnd :: (a -> Bool) -> [a] -> [a]
dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) []
--- | \(\mathcal{O}(min(m,n))\). The 'stripPrefix' function drops the given
+-- | \(\mathcal{O}(\min(m,n))\). The 'stripPrefix' function drops the given
-- prefix from a list. It returns 'Nothing' if the list did not start with the
-- prefix given, or 'Just' the list after the prefix, if it does.
--
@@ -319,7 +319,7 @@ findIndices p ls = build $ \c n ->
in foldr go (\_ -> n) ls 0#
#endif /* USE_REPORT_PRELUDE */
--- | \(\mathcal{O}(min(m,n))\). The 'isPrefixOf' function takes two lists and
+-- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and
-- returns 'True' iff the first list is a prefix of the second.
--
-- >>> "Hello" `isPrefixOf` "Hello World!"
diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs
index 2a2b4cb58d..0ed8cafbd6 100644
--- a/libraries/base/GHC/List.hs
+++ b/libraries/base/GHC/List.hs
@@ -1013,7 +1013,7 @@ NB: Zips for larger tuples are in the List module.
-}
----------------------------------------------
--- | \(\mathcal{O}(min(m,n))\). 'zip' takes two lists and returns a list of
+-- | \(\mathcal{O}(\min(m,n))\). 'zip' takes two lists and returns a list of
-- corresponding pairs.
--
-- > zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]
@@ -1071,7 +1071,7 @@ zip3FB cons = \a b c r -> (a,b,c) `cons` r
-- function given as the first argument, instead of a tupling function.
----------------------------------------------
--- | \(\mathcal{O}(min(m,n))\). 'zipWith' generalises 'zip' by zipping with the
+-- | \(\mathcal{O}(\min(m,n))\). 'zipWith' generalises 'zip' by zipping with the
-- function given as the first argument, instead of a tupling function. For
-- example, @'zipWith' (+)@ is applied to two lists to produce the list of
-- corresponding sums: