TransformListComp weird type error
Am I missing something, or is this broken?
Prelude> :set -XTransformListComp
Prelude> import Data.List
Prelude Data.List> [ x | x <- ['a'..'z'], then sort]
<interactive>:5:29:
No instance for (Ord a) arising from a use of `sort'
Possible fix:
add (Ord a) to the context of
a type expected by the context: [a] -> [a]
In the expression: sort
In a stmt of a list comprehension: then sort
In the expression: [x | x <- ['a' .. 'z'], then sort]
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |