<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Belay that last question. I just realized that its the const function being used rather than a constant declaration in const Nothing and const [].<br><br>MIchael<br><br>--- On <b>Sat, 5/30/09, David Menendez <i><dave@zednenem.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: David Menendez <dave@zednenem.com><br>Subject: Re: [Haskell-cafe] Missing a "Deriving"?<br>To: "michael rice" <nowgate@yahoo.com><br>Cc: "Miguel Mitrofanov" <miguelimo38@yandex.ru>, 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 <<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>> wrote:<br>> That works. but it gives just a single
solution [1,2,3] when there are<br>> supposed to be two [[1,2,3],[1,4,3]]. Of course the code in YAHT may be in<br>> error.<br><br>Works for me.<br><br>*Main> searchAll g 1 3 :: [[Int]]<br>[[1,2,3],[1,4,3]]<br>*Main> searchAll g 1 3 :: Maybe [Int]<br>Just [1,2,3]<br>*Main> searchAll g 1 3 :: Failable [Int]<br>Success [1,2,3]<br><br><br>> Also, how the heck does Haskell decide which "success", "failure",<br>> "augment", and "combine" to use in function "searchAll", since there are<br>> five possibilities.<br><br>*Main> :t searchAll<br>searchAll :: (Computation c) => Graph t t1 -> Int -> Int -> 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 <<a
ymailto="mailto:dave@zednenem.com" href="/mc/compose?to=dave@zednenem.com">dave@zednenem.com</a>><br><<a href="http://www.eyrie.org/%7Ezednenem/" target="_blank">http://www.eyrie.org/~zednenem/</a>><br></div></blockquote></td></tr></table><br>