[commit: base] master: Fix a comment about splitAt (fixes #1182). (95cc295)

Ian Lynagh igloo at earth.li
Sun Jun 26 23:14:45 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/95cc295454a47f6605755d6d1947e5e183547d68

>---------------------------------------------------------------

commit 95cc295454a47f6605755d6d1947e5e183547d68
Author: Michal Terepeta <michal.terepeta at gmail.com>
Date:   Mon Jun 20 21:05:11 2011 +0200

    Fix a comment about splitAt (fixes #1182).

>---------------------------------------------------------------

 GHC/List.lhs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/GHC/List.lhs b/GHC/List.lhs
index 838491a..d1954d8 100644
--- a/GHC/List.lhs
+++ b/GHC/List.lhs
@@ -337,7 +337,8 @@ drop                   :: Int -> [a] -> [a]
 -- > splitAt 0 [1,2,3] == ([],[1,2,3])
 -- > splitAt (-1) [1,2,3] == ([],[1,2,3])
 --
--- It is equivalent to @('take' n xs, 'drop' n xs)@.
+-- It is equivalent to @('take' n xs, 'drop' n xs)@ when @n@ is not @_|_@
+-- (@splitAt _|_ xs = _|_@).
 -- 'splitAt' is an instance of the more general 'Data.List.genericSplitAt',
 -- in which @n@ may be of any integral type.
 splitAt                :: Int -> [a] -> ([a],[a])





More information about the Cvs-libraries mailing list