I wanted a Traversable instance for pairing, so I defined one:<br><br>&gt; {-# LANGUAGE TupleSections #-}<br>&gt; {-# OPTIONS_GHC -Wall -fno-warn-orphans #-}<br><br>&gt; import Data.Traversable (Traversable(..))<br>&gt; import Data.Foldable (Foldable(..))<br>

&gt; import Control.Applicative ((&lt;$&gt;))<br><br>&gt; instance Traversable ((,) o) where<br>&gt;   sequenceA (o,fa) = (o,) &lt;$&gt; fa<br><br>However, Foldable is a superclass of Traversable, so I get an error message:<br>

<br>    Could not deduce (Foldable ((,) o)) from the context ()<br>      arising from the superclasses of an instance declaration<br><br>The best I&#39;ve thought of is the following:<br><br>&gt; instance Foldable ((,) o) where<br>

&gt;   fold (_,m) = m<br><br>However, I don&#39;t like how it discards information.<br><br>Some questions:<br><br>* Why is Foldable a superclass of Traversable?<br>* Is there a good choice of a Foldable instance of ((,) o)?<br>

* Are there any other problems with the Traversable instance above (besides foldability)?<br><br>- Conal<br>