Inferred type for hole is not general enough
As noted by @deech in #13050 (closed), inferred types for holes are sometimes not general enough. Example:
Prelude> :set -XNoMonomorphismRestriction -- added this just to make sure
Prelude> :t _ 1 2
<interactive>:1:1: error:
• Found hole: _ :: Integer -> Integer -> t
Where: ‘t’ is a rigid type variable bound by
the inferred type of it :: t at <interactive>:1:1
• In the expression: _
In the expression: _ 1 2
A more general type would be (Num a, Num b) => a -> b -> t.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |