
Hoogling (->) (>>=) gives Error, your search was invalid: Parse Error: Unexpected character '>>=)' Is there a way to escape the input so it would work? (I wasn't really expecting the right results BTW as I think hoogle searches type signatures not patterns in definitions, right?) Thanks, Jim

Hi
Hoogling (->) (>>=) gives
Error, your search was invalid: Parse Error: Unexpected character '>>=)'
Is there a way to escape the input so it would work? (I wasn't really expecting the right results BTW as I think hoogle searches type signatures not patterns in definitions, right?)
What were you expecting it to give you as an answer? Either you want a function named >>=, in which case you have to search for ">>=" - not "(>>=)" as that won't work. This is something I plan to rectify in Hoogle 4. Or you want a function which takes a function as its first argument. "(a -> b) -> c" will give you this - but not find (>>=) ever. Thanks Neil

On Thu, 2007-12-13 at 20:16 +0000, Neil Mitchell wrote:
Hi
Hoogling (->) (>>=) gives
Error, your search was invalid: Parse Error: Unexpected character '>>=)'
Is there a way to escape the input so it would work? (I wasn't really expecting the right results BTW as I think hoogle searches type signatures not patterns in definitions, right?)
What were you expecting it to give you as an answer?
Hi. Sorry, I should have put the question differently -- is there sometimes a need to escape hoogle input (i.e. so I could confirm there were no results, rather than getting an error)? But, thinking about it, there's no reason that this shouldn't give an error as it isn't a type sig. (I was looking for source online somewhere of the monad instance for (->) and only entered it in hoogle out of curiosity...) Sorry to waste your time! As you were :-) Jim
Either you want a function named >>=, in which case you have to search for ">>=" - not "(>>=)" as that won't work. This is something I plan to rectify in Hoogle 4.
Or you want a function which takes a function as its first argument. "(a -> b) -> c" will give you this - but not find (>>=) ever.
Thanks
Neil

Hi
Hi. Sorry, I should have put the question differently -- is there sometimes a need to escape hoogle input (i.e. so I could confirm there were no results, rather than getting an error)?
The only one I'm aware of is that searching for any operator such as (+) needs to be done without brackets.
But, thinking about it, there's no reason that this shouldn't give an error as it isn't a type sig. (I was looking for source online somewhere of the monad instance for (->) and only entered it in hoogle out of curiosity...)
If any syntax did work for this, I'd have expected it to be something like "instance Monad (->)". Unfortunately that won't work, and I'm not sure I even can make it work in future versions, since Hoogle is unable to tell where an instance is defined - Haddock abstracts away this information. Thanks Neil
participants (2)
-
jim burton
-
Neil Mitchell