
http://www.haskell.org/hoogle/ is VERY great for haskeller. However, i feel hoogle should be improved by providing more examples as : isInfixOf :: Eq a => [a] -> [a] -> Bool The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second. Example: isInfixOf "Haskell" "I really like Haskell." -> True isInfixOf "Ial" "I really like Haskell." -> False The Example code will be helpful for programmer to understand its definition. Sincerely! -- View this message in context: http://www.nabble.com/Hoogle-is-great-but-...-tp26046410p26046410.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

This is not a job for Hoogle, it's for library documenters.
However, that might be a good suggestion for haddock: introduce a
"input/output examples" haddock field and present it in hoogle
results. That, however, will only be useful if many library authors
use this feature.
2009/10/25 zaxis
http://www.haskell.org/hoogle/ is VERY great for haskeller. However, i feel hoogle should be improved by providing more examples as :
isInfixOf :: Eq a => [a] -> [a] -> Bool
The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.
Example:
isInfixOf "Haskell" "I really like Haskell." -> True isInfixOf "Ial" "I really like Haskell." -> False
The Example code will be helpful for programmer to understand its definition.
Sincerely! -- View this message in context: http://www.nabble.com/Hoogle-is-great-but-...-tp26046410p26046410.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Eugene Kirpichov Web IR developer, market.yandex.ru

On 2009-10-25 02:46 -0700 (Sun), zaxis wrote:
However, i feel hoogle should be improved by providing more examples...
On 2009-10-25 12:55 +0300 (Sun), Eugene Kirpichov wrote:
This is not a job for Hoogle, it's for library documenters.
"What he said."
But zaxis, here's another thing to look at. There's usually a "view
source" link beside most of the functions that come up in the Haddock
documentation to which Hoogle links. It's worth clicking. You would be
surprised (certainly I was!) at how often looking at the definition
of a function suddenly makes it quite clear what it does, when the
description didn't quite do it for you. (This is one of the joys of
Haskell.)
cjs
--
Curt Sampson

On Sun, Oct 25, 2009 at 2:09 PM, Curt Sampson
But zaxis, here's another thing to look at. There's usually a "view source" link beside most of the functions that come up in the Haddock documentation to which Hoogle links. It's worth clicking. You would be surprised (certainly I was!) at how often looking at the definition of a function suddenly makes it quite clear what it does, when the description didn't quite do it for you. (This is one of the joys of Haskell.)
I tried that with parsec 3, my brain exploded :)

On 10/26/09, David Virebayre
On Sun, Oct 25, 2009 at 2:09 PM, Curt Sampson
wrote: But zaxis, here's another thing to look at. There's usually a "view source" link beside most of the functions that come up in the Haddock documentation to which Hoogle links. It's worth clicking. You would be surprised (certainly I was!) at how often looking at the definition of a function suddenly makes it quite clear what it does, when the description didn't quite do it for you. (This is one of the joys of Haskell.)
I tried that with parsec 3, my brain exploded :) _______
or the printf implementation. I tried to figure it out, then the Cenobites came and got me. ________________________________________
Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I likewise agree this isn't a job for Hoogle, but on a related note see my
previous post in here about needing better documentation (specifically a
proper manual for most hackage pages, not just a bare bones API doc):
http://www.haskell.org/pipermail/haskell-cafe/2009-October/067969.html
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Mon, Oct 26, 2009 at 10:11, David Leimbach
On 10/26/09, David Virebayre
> wrote: On Sun, Oct 25, 2009 at 2:09 PM, Curt Sampson
wrote:
But zaxis, here's another thing to look at. There's usually a "view source" link beside most of the functions that come up in the Haddock documentation to which Hoogle links. It's worth clicking. You would be surprised (certainly I was!) at how often looking at the definition of a function suddenly makes it quite clear what it does, when the description didn't quite do it for you. (This is one of the joys of Haskell.)
I tried that with parsec 3, my brain exploded :) _______
or the printf implementation. I tried to figure it out, then the Cenobites came and got me.
________________________________________
Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Oct 26, 2009 at 1:27 PM, Tom Tobin
On Mon, Oct 26, 2009 at 9:11 AM, David Leimbach
wrote: or the printf implementation. I tried to figure it out, then the Cenobites came and got me.
QOTW, if I may say so.
Only if you like the Hellraiser movies, or Clive Barker's The Hellbound Heart. :-)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Following up on this rather old thread, if you want to see a module
which has lots of input/output example pairs, and properties, in the
documentation then look at filepath (hoogle for takeExtension as an
example). These properties are also automatically transformed in to
test cases, so filepath has good documentation and good test coverage
all in one, plus the documentation is actually checked for
correctness. I think more libraries should do this - so I challenge
someone to write the definitive "tests and assertions in code" package
for Haskell.
And it's nice to hear that Hoogle is great :-)
Thanks, Neil
2009/10/25 zaxis
http://www.haskell.org/hoogle/ is VERY great for haskeller. However, i feel hoogle should be improved by providing more examples as :
isInfixOf :: Eq a => [a] -> [a] -> Bool
The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.
Example:
isInfixOf "Haskell" "I really like Haskell." -> True isInfixOf "Ial" "I really like Haskell." -> False
The Example code will be helpful for programmer to understand its definition.
Sincerely! -- View this message in context: http://www.nabble.com/Hoogle-is-great-but-...-tp26046410p26046410.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (8)
-
Curt Sampson
-
David Leimbach
-
David Virebayre
-
Eugene Kirpichov
-
Kyle Murphy
-
Neil Mitchell
-
Tom Tobin
-
zaxis