<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I figured out the [[Int]] case for myself, but hadn't considered the Failure case. Thanks.<br><br>In function "searchAll", given a calling context Failable [Int],&nbsp; for the line<br><br>&nbsp;&nbsp; where search' [] = failure "no path"<br><br>"failure" would be "Fail", a constructor that takes a String. Right?<br><br>But using either of the other two contexts, where failure equals either const Nothing or const [] it would seem like that same string argument "no path" would be passed to either Nothing or [], which doesn't make any sense. Explanation?<br><br>Michael<br><br>--- On <b>Sat, 5/30/09, David Menendez <i>&lt;dave@zednenem.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: David Menendez &lt;dave@zednenem.com&gt;<br>Subject: Re: [Haskell-cafe] Missing a
 "Deriving"?<br>To: "michael rice" &lt;nowgate@yahoo.com&gt;<br>Cc: "Miguel Mitrofanov" &lt;miguelimo38@yandex.ru&gt;, haskell-cafe@haskell.org<br>Date: Saturday, May 30, 2009, 9:33 PM<br><br><div class="plainMail">On Sat, May 30, 2009 at 9:00 PM, michael rice &lt;<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt; wrote:<br>&gt; That works. but it gives just a single solution [1,2,3] when there are<br>&gt; supposed to be two [[1,2,3],[1,4,3]]. Of course the code in YAHT may be in<br>&gt; error.<br><br>Works for me.<br><br>*Main&gt; searchAll g 1 3 :: [[Int]]<br>[[1,2,3],[1,4,3]]<br>*Main&gt; searchAll g 1 3 :: Maybe [Int]<br>Just [1,2,3]<br>*Main&gt; searchAll g 1 3 :: Failable [Int]<br>Success [1,2,3]<br><br><br>&gt; Also, how the heck does Haskell decide which "success", "failure",<br>&gt; "augment", and "combine" to use in function "searchAll", since there are<br>&gt; five
 possibilities.<br><br>*Main&gt; :t searchAll<br>searchAll :: (Computation c) =&gt; Graph t t1 -&gt; Int -&gt; Int -&gt; c [Int]<br><br>The way searchAll is written, the choice of which functions to use<br>depends on the type variable c. That's determined by the calling<br>context of searchAll, which is why you need to provide a type<br>signature when using it at the GHCi command line.<br><br>-- <br>Dave Menendez &lt;<a ymailto="mailto:dave@zednenem.com" href="/mc/compose?to=dave@zednenem.com">dave@zednenem.com</a>&gt;<br>&lt;<a href="http://www.eyrie.org/%7Ezednenem/" target="_blank">http://www.eyrie.org/~zednenem/</a>&gt;<br></div></blockquote></td></tr></table><br>