:i Show
type Show :: * -> Constraint
class Show a where
...
I see obvious Show still accepts only lifted types (* is Type).
I haven’t found any reference related to the problem of reusing existing classes for unlifted types in the extension proposal.
What is the default recipe for such scenario?
Should define or look for Show counterpart class prefixed with S i.e. SShow?
• Expecting a lifted type, but ‘MyUnliftedBoxed’ is unlifted
• In the first argument of ‘Show’, namely ‘MyUnliftedBoxed’
In the instance declaration for ‘Show MyUnliftedBoxed’
|
14 | instance Show MyUnliftedBoxed where
GHC doesn’t suggest anything.
Update:
I see Show class should be levity polymorphic, but it isn’t.
So rephrasing my original question - why standard classes are not levity polymorphic?