Ticket #1182: 0001-Fix-a-comment-about-splitAt-fixes-1182.patch

File 0001-Fix-a-comment-about-splitAt-fixes-1182.patch, 906 bytes (added by michalt, 4 years ago)

Fix comment in base.

  • GHC/List.lhs

    From 1ca9160809ca211106c085f2b54a6be30863e279 Mon Sep 17 00:00:00 2001
    From: Michal Terepeta <[email protected]>
    Date: Mon, 20 Jun 2011 21:05:11 +0200
    Subject: [PATCH] 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 ff8593c..65975e9 100644
    a b drop :: Int -> [a] -> [a] 
    336336-- > splitAt 0 [1,2,3] == ([],[1,2,3])
    337337-- > splitAt (-1) [1,2,3] == ([],[1,2,3])
    338338--
    339 -- It is equivalent to @('take' n xs, 'drop' n xs)@.
     339-- It is equivalent to @('take' n xs, 'drop' n xs)@ when @n@ is not @_|_@
     340-- (@splitAt _|_ xs = _|_@).
    340341-- 'splitAt' is an instance of the more general 'Data.List.genericSplitAt',
    341342-- in which @n@ may be of any integral type.
    342343splitAt                :: Int -> [a] -> ([a],[a])