3 ms·
The fully qualified type is traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) and deriving it for your own types is as simple as
by tromp 2y ago
The fully qualified type is
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
and deriving it for your own types is as simple as
data MyType ... = ... deriving (Traversable)
- sfvisser 2y agoCorrect! I simply copied the definition from the type class, but the context is important.