Nonsense evaluation: sequence [] = []
$ ghci-7.6.2
GHCi, version 7.6.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
>>> sequence []
[]
>>> :t it
it :: [()]
>>> sequence [] :: [()]
<interactive>:4:1:
Couldn't match type `[a0]' with `()'
Expected type: [()]
Actual type: [[a0]]
In the return type of a call of `sequence'
In the expression: sequence [] :: [()]
In an equation for `it': it = sequence [] :: [()]
Wat. Where on earth did ghci get the idea that sequence [] = []?
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |