"Ugh," you might think... "Another syntax question, here let me google that for you noob." But alas! I have googled it, and I am still stumped!
Found in this code from the yesod blog
import System.IO
import Data.Enumerator
import Data.Enumerator.Binary
main =
withFile "output.txt" WriteMode $ \output ->
run_ $ enumFile "input.txt" $$ iterHandle output
However the "$$" operator is new to me. The Haskell 2010 report only mentions it once as an operator symbol. What does it do?
In Haskell, operators like $$
are not part of the syntax, they are user-definable functions. Hence, you need to look up the API documenation for Yesod to see what $$
is. In particular, the function $$
from your example is documented here.
There's Hoogle, which is pretty good but unfortunately doesn't know many packages.
Hayoo knows much more, but its interface seems quirky, and it doesn't seem to offer a command-line tool like hoogle does.
If you have an idea what package you're dealing with, you can directly go to its documentation—e.g. the docs of the enumerator package, with the module list at the bottom. Also, these docs always have an index, and let you view the source code via the source links.
As a last resort, use cabal unpack enumerator
and grep through the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With