take n (take m list) returns [] for some m.
See the example below. I think the second output should be [1], too. I also tried ghc and runghc, and the results were the same.
ghci> take 1 (take (10^11) [1..])
[1]
it :: [Integer]
ghci> take 1 (take (10^12) [1..])
[]
it :: [Integer]
ghci> take 1 (take (10^13) [1..])
[1]
it :: [Integer]
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |