News for hackers. Stuff that matters.
Re:The Hassle of Haskell by warmfuzzykitten on Saturday July 19, 2014 @07:04PM (#8059065)
Author seems unaware that ..- might be parsed as a single operator, seems "not mathematical" to her. A good illustration how beginners in any language get hung up on small things that are different than other languages they know.
Re:The Hassle of Haskell by TheLoneWolfling on Saturday July 19, 2014 @07:17PM (#8059086)
It seems like a flaw in Haskell's parser to me.

It looks like it is doing basic greedy tokenizing before passing it on to the parser, and, as this shows, that is not the best fit in this case.

Syntactically significant whitespace is seldom a good thing. (With the potential exception of indentation.)

Re:The Hassle of Haskell by TheCoelacanth on Monday July 21, 2014 @10:25AM (#8063796)
Practically every other language does the same thing. For instance in C would you expect `int x;` to be the same as `intx;`?
Re:The Hassle of Haskell by TheLoneWolfling on Tuesday July 22, 2014 @09:01AM (#8068687)
No. But I expect this to not be parsed as a single comment:

     /* <stuff> */ <stuff> /* <stuff> */
Re:The Hassle of Haskell by kluge on Tuesday July 22, 2014 @03:10PM (#8070986)
I think it's just normal tokenizing. `..-` is a legal name for an operator. An error is given since no operator of that name is in scope.

The alternative of this getting parsed as a range operator and a negative number now and changing to an application of `..-` if that is ever defined or imported doesn't sound very good...