discrimination icon indicating copy to clipboard operation
discrimination copied to clipboard

Grouping nested recursive types?

Open spacekitteh opened this issue 6 years ago • 0 comments

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?

spacekitteh avatar Dec 19 '19 05:12 spacekitteh