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

Warnings when evaling pure expressions. #21

Open
V0ldek opened this issue Apr 30, 2020 · 0 comments
Open

Warnings when evaling pure expressions. #21

V0ldek opened this issue Apr 30, 2020 · 0 comments

Comments

@V0ldek
Copy link
Owner

V0ldek commented Apr 30, 2020

The eval statement accepts any type of expression as its operand. However, I predict that users would very rarely want to eval pure values and usually an eval with a non-sideeffect operand would point to a bug -- it's easy to forget the parentheses at the end of the statement. Introduce a warning to indicate this to a user.

main :: sideeffect -> ()
main = {
  eval printLn "Hello world"; // Likely a bug, missing parantheses "()".
}
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

1 participant