Suggest NoMonomorphismRestriction or type signature
The following program results in a compile error. To fix the error one can either give an explicit signature or turn on NoMonomorphismRestriction. Could the compile error please mention both of these options (and provide the exact type signature required)?
type family G a b
data D a = D (G a ())
d = D ()
• Couldn't match expected type ‘G a0 ()’ with actual type ‘()’
The type variable ‘a0’ is ambiguous
• In the first argument of ‘D’, namely ‘()’
In the expression: D ()
In an equation for ‘d’: d = D ()
• Relevant bindings include
d :: D a0
Trac metadata
| Trac field | Value |
|---|---|
| Version | |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |