Open bonds opened 8 years ago
Odd thanks for filing this! Will take a look this afternoon!
@spinda and @gridaphobe any chance the panic is due to the missing z3 path?
@bonds what is the result of 'which z3'?
~/s/winot (master|✔) ❯❯❯ which z3 Sun Apr 10 10:07:10 PDT 2016
/home/scott/.pyenv/shims/z3
liquid does seem to be working on certain files in the project, so it at least sometimes can find z3:
~/s/winot (master|✔) ❯❯❯ stack exec -- liquid app/Main.hs
LiquidHaskell Copyright 2009-15 Regents of the University of California. All Rights Reserved.
**** DONE: Parsed All Specifications ******************************************
**** DONE: Loaded Targets *****************************************************
**** DONE: Extracted Core using GHC *******************************************
**** DONE: generateConstraints ************************************************
Done solving.
Safe
**** DONE: solve **************************************************************
**** DONE: annotate ***********************************************************
**** RESULT: SAFE **************************************************************
~/s/winot (master|✔) ❯❯❯ Sun Apr 10 10:18:55 PDT 2016
There is not much in that file, as you can see, but you can at least see that liquid isn't complaining that it can't find a solver.
Ugh, the problem is that winot.cabal
sets a few default extensions that we don't see. They need to be passed explicitly on the command-line, as for ghc-mod or hdevtools.
% stack exec liquid -- -isrc src/Wwan.hs -g-XOverloadedStrings -g-XNoImplicitPrelude
LiquidHaskell Copyright 2009-15 Regents of the University of California. All Rights Reserved.
**** DONE: Parsed All Specifications ******************************************
**** DONE: Loaded Targets *****************************************************
**** DONE: Extracted Core using GHC *******************************************
**** DONE: generateConstraints ************************************************
Done solving.
Safe
**** DONE: solve **************************************************************
**** DONE: annotate ***********************************************************
**** RESULT: SAFE **************************************************************
I try to avoid setting defaults in the .cabal file for this reason.
@ranjitjhala this is a perfect example of the pain that we could avoid if we got LH working as a GHC plugin :)
Ah thanks! Wonder if there is some way to make this clear to users. At the very least we should make a troubleshooting /faq that explains the limitation...
On Apr 10, 2016, at 11:32 AM, Eric Seidel notifications@github.com wrote:
Ugh, the problem is that winot.cabal sets a few default extensions that we don't see. They need to be passed explicitly on the command-line, as for ghc-mod or hdevtools.
% stack exec liquid -- -isrc src/Wwan.hs -g-XOverloadedStrings -g-XNoImplicitPrelude LiquidHaskell Copyright 2009-15 Regents of the University of California. All Rights Reserved.
\ DONE: Parsed All Specifications ****
** DONE: Loaded Targets ***
** DONE: Extracted Core using GHC *****
\ DONE: generateConstraints **
Done solving. Safe
\ DONE: solve ****
** DONE: annotate *****
\ RESULT: SAFE **** I try to avoid setting defaults in the .cabal file for this reason.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub
I think part of the problem is that we (probably) discard the result of the load LoadAllTargets
call, which I believe would tell us that some modules failed to compile (and why).
Also, @spinda's new cabal integration probably sidesteps this issue entirely since it has easy access to the cabal info.
@bonds Can you give liquidhaskell-cabal a try? It should be a drop-in solution to this sort of problem.
The particular issue of not handling load failures correctly is fixed in the api-annotations
branch.
@gridaphobe GHC plugin integration is getting closer! The pieces are starting to fall into place.
I am attempting to check this project: https://github.com/bonds/winot. I am running liquid from the project root like so:
It doesn't seem to figure out which files to include on its own. Trying
stack exec -- liquid -i src src/Wwan.hs
yields the same result. Adding--cabal-dir
with or without-i src
yields the same result. Using--c-files=
in reference to one of the files in the error message seems to be a step in the right direction:So I include another like so:
How about another?
Hmm, that time including an additional file didn't do anything. Maybe the ordering matters?
Hmm. The 'impossible' happened. Not sure what to try next. Here's some info on my environment:
I am running liquid at commit 4adc84421e6cfed601c8202ee99191beb99e5576.