I have defined my own typeclass over the uncons operation
class Uncons container a | container -> a where
uncons_ :: container -> Maybe (a, container)
I’d like to have an automatic Foldable
instance derivation for any type that already instances Uncons
. Is there a way for me to locally “force” the kind of Uncons container
from * -> Constraint
to * -> *
for me to be able to drop it into a Foldable instance definition?