[Git][ghc/ghc][master] Typeset Big-O complexities with Tex-style notation (#16090)

Marge Bot gitlab at gitlab.haskell.org
Fri May 3 17:46:50 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
4186b410 by Sven Tennie at 2019-05-03T17:40:36Z
Typeset Big-O complexities with Tex-style notation (#16090)

Use `\min` instead of `min` to typeset it as an operator.

- - - - -


2 changed files:

- libraries/base/Data/OldList.hs
- libraries/base/GHC/List.hs


Changes:

=====================================
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!"


=====================================
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:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4186b4100380fae1b91cae0d2fbb224ad70dc5f3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4186b4100380fae1b91cae0d2fbb224ad70dc5f3
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190503/4fe56d36/attachment-0001.html>


More information about the ghc-commits mailing list