
20 Feb
2008
20 Feb
'08
7:53 p.m.
Stefan O'Rear wrote:
On Wed, Feb 20, 2008 at 07:18:42PM -0500, Steve Lihn wrote:
If ~> does not have any special meaning and it could be ### or xyz, then how does GHC know to print a ~> b, but not ~> a b a ### b, but not ### a b xyz a b, but not a `xyz` b
Simply because xyz is alphanumeric?
Yes.
To slightly elaborate this: In Haskell, normal (prefix) functions and operators (infix) functions are syntactically distinguished by the characters they may contain: the former must contain only alphanumerics plus ' and _, the latter only operator symbols such as !#$%&*+./<=>?@\^|-~ for details see the Haskell98 Report (http://www.haskell.org/onlinelibrary/lexemes.html). Cheers Ben