length "foo" doesn't work with -XOverloadedStrings
The extensions to the defaulting rule for -XOverloadedStrings aren't sufficient to make length "foo"
typecheck without an annotation. The reason is that we end up with a constraint IsString [a]
, and we would somehow have to decide to instantiate a to Char to get the hoped-for behaviour.
It would be nice if this could be made to work (perhaps just with -XExtendedDefaultRules), if a solution can be found without too much hacking.
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |