[GHC] #12440: Strictness of span and break does not match documentation

#12440: Strictness of span and break does not match documentation -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 8.0.1 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The [http://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html#v:span documentation] of `span` says `span p xs` is equivalent to `(takeWhile p xs, dropWhile p xs)` However, that's not literally true since `span p xs` is _|_ if either `xs` is _|_ or `xs = x :_` and `p x` is _|_. This same error is also present in the Haskell 98 report, which states the same property of `span` but gives a definition equivalent to the one used by GHC. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12440 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC