Unlifted class method rejected
If I say
class C a where
meth :: Array# a
I get
• Expecting a lifted type, but ‘Array# a’ is unlifted
• In the type signature: meth :: Array# a
In the class declaration for ‘C’
This definition looks OK to me. I don't see why we can't have an unlifted member of a class.
(As @oerjan points out in ticket:12708#comment:128807, we can't have a levity-polymorphic class member, but this is solidly levity-monomorphic.)
I'm happy to lift this restriction in ongoing work in this area, but I wanted to double-check before doing so.
For the record, the same error occurs even when the class has more than one member, so it's not the no-unlifted-newtypes restriction.
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 |