Skip to content

Warnings when evaling pure expressions. #21

@V0ldek

Description

@V0ldek

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 "()".
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions