3 ms·
Special operators out the wazzoo...Google doesn't help here - I don't even know the verbal names for some of them. Operators are just functions, so try Hoogle:
by teaspoon 15y ago
Special operators out the wazzoo...Google doesn't help here - I don't even know the verbal names for some of them.
Operators are just functions, so try Hoogle:
http://www.haskell.org/hoogle/?hoogle=%3E%3E%3D http://www.haskell.org/hoogle/?hoogle=%3E%3E%3D
- gtani 15y agohttp://haskell.org/haskellwiki/Keywords http://haskell.org/haskellwiki/Keywords
- gtani 15y ago(too late to edit above) The haskell wiki link is not adequate, relative to the RW Haskell hard copy index (not avail. online unfortunately), which starts with 1.3 pages of symbol function names (and is missing a few relatively common QuickCheck symbol names). I was looking for something like the Scala staircase book, first edition freely available online, which has a complete list for that language.
- teaspoon 15y agoWhatever symbols you're seeing in RWH that aren't on that wiki page are probably functions, not keywords. For functions, you should use Hoogle. For better or worse, there will never be a complete list of infix functions for Haskell because new infix functions can be defined by the user.
- pnathan 15y agoFYI: Hoogle dies on :: and `, and gives a wrong result for =>. Please note that this is just a simple problem, with a solution of printing out the right reference cheatsheet. The real difficulty comes (IMO) when looking at piles of symbols in code and trying to determine what kind of meaning is coming from the symbol soup (C++ and Perl are notorious for this too). Quite often (usually?), of course, public Haskell is written in a very clear and readable style. That's a major reason to use Haskell - to write in a readable language.
- teaspoon 15y agoYou won't find :: and => in Hoogle because they're keywords, not functions. For keywords, see the the wiki page that gtani posted: http://haskell.org/haskellwiki/Keywords http://haskell.org/haskellwiki/Keywords I recommend reading Learn You a Haskell instead; the keywords were second nature to me by the time I finished. I agree that there's too much "symbol soup" Haskell out there that uses infix functions excessively. Even if you recognize all of the functions, you still need to have their precedences memorized to decode the soup.