Hi Albert,
When I tried to test a script I had written using notepad on my Linux
box I got the following errors.
erucker@erucker:~/Desktop$ pure -i test.pure
'est.pure:4.8: invalid character '
test.pure:4.8: syntax error, unexpected invalid character
'est.pure:5.14: invalid character '
test.pure:6.28: syntax error, unexpected ']', expecting '=' or '|'
test.pure:6.62-64: syntax error, unexpected ']', expecting '=' or '|'
'est.pure:6.66: invalid character '
...
Notice that it says 'est.pure...' instead of 'Test.pure...' Anyway, the
first few lines of the source were:
qsort p [] = [];
qsort p (x:xs)
= sort p [l; l = xs; l < x] + (x : sort p [r; r = xs; r >= x])
with
x < y = p x y;
x >= y = not p x y;
end;
When, I opened the file from emacs, I noticed all of the ^M ('\r's) at
the end of each line. After removing them, the script runs fine. To say
the least, it was a hard bug to find because the script looked just fine
from Kate.
e.r.
|