discrimination
discrimination copied to clipboard
Grouping nested recursive types?
So I have the following type
data Atom v = Variable v
| Term [Atom v]
deriving stock (Eq, Read, Data, Typeable, Generic, Generic1, Functor, Foldable, Traversable)
instance Grouping v => Grouping (Atom v)
Calling group always hangs, even with an empty list, and no matter the type of v.
Is this a case where I must write a custom instance?