summaryrefslogtreecommitdiff
path: root/docs/users_guide/bugs.xml
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2014-12-09 18:12:33 -0600
committerAustin Seipp <austin@well-typed.com>2014-12-09 19:59:27 -0600
commit8b480d3192e6eff6183934d7bbcc2054611c3651 (patch)
treea4748104121093f932254b3234efd6cbbfaa3a5d /docs/users_guide/bugs.xml
parent09b7943321f89b945d10f8a914f4c2cbf73dff91 (diff)
downloadhaskell-8b480d3192e6eff6183934d7bbcc2054611c3651.tar.gz
Document splitAt deviation from the Report
Summary: `splitAt` is stricter than the Report specifies, so we should say so. Reviewers: hvr, austin Reviewed By: austin Subscribers: carter, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D562 GHC Trac Issues: #9870
Diffstat (limited to 'docs/users_guide/bugs.xml')
-rw-r--r--docs/users_guide/bugs.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/users_guide/bugs.xml b/docs/users_guide/bugs.xml
index 2d6fc6583b..30770f0f90 100644
--- a/docs/users_guide/bugs.xml
+++ b/docs/users_guide/bugs.xml
@@ -292,6 +292,17 @@ checking for duplicates. The reason for this is efficiency, pure and simple.
</listitem>
</varlistentry>
<varlistentry>
+ <term><literal>splitAt</literal> semantics</term>
+ <para><literal>Data.List.splitAt</literal> is stricter than specified in the
+ Report. Specifically, the Report specifies that
+<programlisting>splitAt n xs = (take n xs, drop n xs)</programlisting>
+ which implies that
+<programlisting>splitAt undefined undefined = (undefined, undefined)</programlisting>
+ but GHC's implementation is strict in its first argument, so
+<programlisting>splitAt undefined [] = undefined</programlisting>
+ </para>
+ </varlistentry>
+ <varlistentry>
<term><literal>zip</literal> and <literal>zipWith</literal> semantics</term>
<para><literal>zip</literal> and <literal>zipWith</literal> can give
less defined results than the Report specifies in certain cases. This deviation