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

examples/ex1: Couldn't match expected type: IO Logger ... #14

Open
jwaldmann opened this issue Aug 15, 2022 · 2 comments
Open

examples/ex1: Couldn't match expected type: IO Logger ... #14

jwaldmann opened this issue Aug 15, 2022 · 2 comments

Comments

@jwaldmann
Copy link
Contributor

ghc  examples/ex1.hs SimpleSMT.hs
...
examples/ex1.hs:5:11: error:
    • Couldn't match expected type: IO Logger
                  with actual type: Int -> IO Logger
    • Probable cause: ‘newLogger’ is applied to too few arguments
      In a stmt of a 'do' block: l <- newLogger

I think newLogger was extended with an argument, but the example was not updated.

The trivial fix is

 main =
-  do l <- newLogger
+  do l <- newLogger 0
      s <- newSolver "cvc4" ["--lang=smt2"] (Just l)

I can do it. Perhaps it should be part of a test suite. But this would probably require that some SMT solver is present. cvc4 is superseeded by cvc5, and for that, we can simply write

     s <- newSolver "cvc5" [] (Just l)

(we don't need the option).

@jwaldmann
Copy link
Contributor Author

Sorry I put the wrong issue number in my commit, so it does not appear here automatically. a376f57

@yav
Copy link
Owner

yav commented Aug 19, 2022

Would you mind make a PR to fix this?

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

2 participants