k-legacy icon indicating copy to clipboard operation
k-legacy copied to clipboard

improve error message

Open grosu opened this issue 8 years ago • 0 comments

I'm using the online interface, definition 1_k/1_lambda/lesson_1. kompile then krun with arguments

free-variable-capture.lambda -d .. -pattern "<k> V:K </k>"

Getting this error message:

[Error] Critical: Dynamic parameter expected a value of the form a=b but
got:attern    

The only problem in the above is that I used -pattern (one dash) instead of --pattern. The error message though does not help me at all to understand what I did wrong.

Also, besides the obvious got:attern, the a=b info is incorrect. What is a and what is b? Trying to krun with the arguments (so using an =)

free-variable-capture.lambda -d .. --pattern = "<k> V:K </k>"

I get another unhelpful message:

[Error] Critical: You can only specify $PGM on the command line itself

It works once I remove = . However, the online interface outputs the message

Running command: krun free-variable-capture.lambda -d .. --pattern <k> V:K </k>
Search results:

Solution 1:
V:K -->
a ( ( lambda x . lambda y . x ) y z )

which has two problems. First, the pattern must be in quotes, as a string, in the command; indeed, if I krun with arguments

free-variable-capture.lambda -d .. --pattern <k> V:K </k>

I get again the unhelpful error message

[Error] Critical: You can only specify $PGM on the command line itself

Second, I would not expect to see a "Search results:" message, because I have not used the --search option in krun.

grosu avatar Apr 03 '16 10:04 grosu