Unify behaviour of `elm-verify` and `elm make --verify`
Behaviour
Using stack run --cwd "../elm-examples/Easy/" elm-verify src/Const.elm
produces
-- UNNAMED MODULE ------------------------------------------------ src/Const.elm
The `Main` module must start with a line like this:
module Main exposing (..)
Try adding that as the first line of your file!
Note: It is best to replace (..) with an explicit list of types and functions
you want to expose. If you know a value is only used WITHIN this module, it is
extra easy to refactor. This kind of information is great, especially as your
project grows!
elm-verify: user error (Pattern match failure in do expression at src/Main.hs:20:5-12)
instead of
[==================================================] - 1 / 1
Basic Checks Passed, continuing with verification!
SpecSet SpeckGroup{ fun = constant, pre = [even], post = [five], inv = TODO}
SFun [("n",SType "Int")] (Fun "==" [Fun "mod" [Var "n" (SType "Int"),Constant (TInt 2)],Constant (TInt 0)])
SFun [("a",SType "Int")] (Constant (TInt 5))
SFun [("a",SType "Int"),("result",SType "Int")] (Fun "==" [Var "result" (SType "Int"),Constant (TInt 5)])
Success! Compiled 1 module.
Q.E.D.
Verification sucessfull
like stack run --cwd "../elm-examples/Easy/" elm -- make --verify src/Const.elm
.
Possible cause
-
elm-verify
looks for a package whileelm make --verify
is given modules/files as arguments