UnknownOperatorAnUnknownOperatorTest
Tags:elm19-compile-errorelm-spec
Checks, in A Standard Definition of Elm?:rule s-atexp-op
Not translated into Lean for the mechanisation of the book: see why.
Using an operator that no module defines, `1 <=> 2`, is rejected with an UNKNOWN OPERATOR error.
Results
elm-0.19.1
passOutput
Compiling ...-- UNKNOWN OPERATOR --------------- src/UnknownOperatorAnUnknownOperatorTest.elm
I do not recognize the (<=>) operator.
14| 1 <=> 2
^^^
Is there an `import` and `exposing` entry for it? Maybe you want (<=) or (/=)
instead?
Detected problems in 1 module.
elm-0.19.2
passOutput
Compiling ...-- UNKNOWN OPERATOR --------------- src/UnknownOperatorAnUnknownOperatorTest.elm
I do not recognize the (<=>) operator.
14| 1 <=> 2
^^^
Is there an `import` and `exposing` entry for it? Maybe you want (<=) or (/=)
instead?
Detected problems in 1 module.
elm-0.19.3
passOutput
Compiling ...-- UNKNOWN OPERATOR --------------- src/UnknownOperatorAnUnknownOperatorTest.elm
I do not recognize the (<=>) operator.
14| 1 <=> 2
^^^
Is there an `import` and `exposing` entry for it? Maybe you want (<=) or (<)
instead?
Detected problems in 1 module.
lamdera-1.5.0
passOutput
Detected problems in 1 module.
-- UNKNOWN OPERATOR --------------- src/UnknownOperatorAnUnknownOperatorTest.elm
I do not recognize the (<=>) operator.
14| 1 <=> 2
^^^
Is there an `import` and `exposing` entry for it? Maybe you want (<=) or (<)
instead?
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm/UnknownOperatorAnUnknownOperatorTest] in its title.
Source
The -- CHECK: lines give the expected output.
module UnknownOperatorAnUnknownOperatorTest exposing (..)
{-| Using an operator that no module defines, `1 <=> 2`, is rejected with an UNKNOWN OPERATOR
error.
-}
-- TAGS: elm19-compile-error
-- TAGS: elm-spec, s-atexp-op
-- COMPILE-ERROR: UNKNOWN OPERATOR, an unknown operator
-- CHECK: -- UNKNOWN OPERATOR -
testValue =
1 <=> 2
Lean translation
No reduced program for Lean's evaluator: the test expects a compile error, so it has no meaning to evaluate. Static semantics: expected to be rejected, and the translator's front end refuses it: it breaks a restriction on characters, tokens and layout, which Lean does not model. See the Lean mechanisation for which tests are in Lean, and why.