Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undetected Syntax Error: "tau" -> "term" #16

Open
LEARNTAU opened this issue Jan 1, 2025 · 2 comments
Open

Undetected Syntax Error: "tau" -> "term" #16

LEARNTAU opened this issue Jan 1, 2025 · 2 comments

Comments

@LEARNTAU
Copy link

LEARNTAU commented Jan 1, 2025

Ubuntu Linux OS
Tau version: 0.7 (v0.7-alpha-145-g82e48cd)

This code was brought up by l0g1x at Telegram group channel.

test(n):=(n=0) -> 1

"tau" -> "term" is a syntax error and should be "tau" -> "tau"

test(n) := (n=0) -> T

The syntax error got into a loop and typing "." makes the error detected.

image

@pt7k
Copy link
Contributor

pt7k commented Jan 1, 2025

From what I can see it's not entering a loop, but into a multi-line mode. Same thing happens when you leave unbalanced parentheses at the end of your definition.
Basically it let's you finish your definition in the line below or alternatively you can go back to the original line using a backspace.

Try typing: test(n) := (n=0) -> 1 hit <enter>
and when you are in the second line type: = n hit <enter>
If you did that, you just entered test(n) := (n=0) -> 1 = n but just broken down into 2 lines of input.
Or instead of finishing the definition like that you can also backspace to the first line and fix the definition by replacing 1 with T and hitting enter.

@tklip
Copy link
Contributor

tklip commented Jan 9, 2025

Thanks for the report and explanation. Multiline input is confusing for users.

We will add a slightly different prompt to other lines so it is clear that the REPL awaits more input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants