Comments (21)
@christetreault you can take a look here for 3.2:
http://goto.ucsd.edu:8090/index.html#?demo=permalink%2F1423863481.hs
from liquidhaskell-tutorial.
Doesn't work for me (liquid haskell 0.3.0.0, liquid-fixpoint 0.2.2.0, ghc 7.8.3, z3 4.4.0).
To be fair, if I copy my code and paste it into your demo page, it type checks.
from liquidhaskell-tutorial.
This is weird, it is safe for me with liquidHaskell-3....
In the Context the specified refinement of vec
is lost and I do not know why....
from liquidhaskell-tutorial.
I am using the binaries on hackage, not the current repo. Perhaps something you did in the last few days fixed this?
from liquidhaskell-tutorial.
Maybe. Can you please do a make test
to see what else is broken in your current setup?
from liquidhaskell-tutorial.
To be clear, you want me to clone the current liquidhaskell repo and build it with make test
?
I'm having some trouble getting the dependencies resolved. It seems some module tasty has a dependency on optparse-applicative == 0.11.*, and cabal install installs version 0.8.1
from liquidhaskell-tutorial.
OK, I think I know the problem (@gridaphobe : I fear its DIFFCHECK)
@christetreault can you do this:
- Use exactly the same signature as you have in the screenshot above,
- Change the body of the function a little bit by adding whitespace e.g. to
unsafeLookup index vec = vec ! index
Can you let me know if that works?
from liquidhaskell-tutorial.
@christetreault do it on the version you have -- no need to rebuild.
from liquidhaskell-tutorial.
Also, very sorry you ended up wasting so much time on this! Going forward, if you get stuck for even more than 20mins, shoot an email/issue because to me thats a "bug" in the tutorial...
from liquidhaskell-tutorial.
Well, I did that, and it worked. Then I undid it, and now it still works. Is it caching results in that .liquid
folder that's in the source dir?
from liquidhaskell-tutorial.
Sigh. Sorry again!
Yes, its caching the results and it only "rechecks" a function
if you change the implementation for the function (even
slightly, e.g add a blank space.) This makes things very fast,
BUT has these weird effects (and of course, should be something
that is explained in the tutorial...!)
Most certainly my bad...
from liquidhaskell-tutorial.
@ranjitjhala given that we also support checking specific binders with -b
, we could extend the emacs mode with a command to check the function the point is in.
from liquidhaskell-tutorial.
So if I write a function, then write a messed up specification for said function, then fix the spec, it will never recheck it unless I change the function or clear the cache?
from liquidhaskell-tutorial.
Good idea, except that would require writing emacs-lisp
to determine the binder right?
May be easier to tweak LH with an option:
"--check-line N"
which would force checking of all binders around N-4 ... N+4
which would be:
(a) trivial to do in the "Diff" module
(b) trivial to add in the emacs mode (easy to get N = cursor's position)
On Fri, Feb 13, 2015 at 3:52 PM, Eric Seidel [email protected]
wrote:
@ranjitjhala https://github.com/ranjitjhala given that we also support
checking specific binders with -b, we could extend the emacs mode with a
command to check the function the point is in.Reply to this email directly or view it on GitHub
#3 (comment)
.
Ranjit.
from liquidhaskell-tutorial.
Yes, it will not recheck UNTIL you "jostle" the function a bit,
e.g. go inside the body and add a " " somewhere ...
(or you go and DELETE the "--diff" flag at the top of the file...
On Fri, Feb 13, 2015 at 3:54 PM, Chris Tetreault [email protected]
wrote:
So if I write a function, then write a messed up specification for said
function, it will never recheck it unless I change the function or clear
the cache?Reply to this email directly or view it on GitHub
#3 (comment)
.
Ranjit.
from liquidhaskell-tutorial.
@ranjitjhala most major-modes (including haskell-mode) provide functions to determine the function-at-point :)
from liquidhaskell-tutorial.
This wouldn't directly solve the issue of only editing a spec, but we could extend hsakell-mode's function to notice when it's inside a liquid-spec. I'll look into it next week.
from liquidhaskell-tutorial.
That being said, it might be nicer to just fix the issue at the level of diffcheck. E.g. do an actual diff of the new and saved files and check everything that depends on changed lines.
from liquidhaskell-tutorial.
Good point (Re: major modes) but in general, given
the choice between hacking emacs-lisp and hacking
haskell, I think the right answer is pretty clear to me :)
On Fri, Feb 13, 2015 at 3:58 PM, Eric Seidel [email protected]
wrote:
This wouldn't directly solve the issue of only editing a spec, but we
could extend hsakell-mode's function to notice when it's inside a
liquid-spec. I'll look into it next week.Reply to this email directly or view it on GitHub
#3 (comment)
.
Ranjit.
from liquidhaskell-tutorial.
This issue should be closed after PR #27 is merged
from liquidhaskell-tutorial.
So it seems that this particular case is fixed. Using the following command line, it works:
cabal exec liquid ../liquidhaskell-tutorial/src/04-poly.lhs -- --diffcheck
from liquidhaskell-tutorial.
Related Issues (20)
- Regarding reverse in Ch 8: Sets HOT 2
- How to workaround using Stack for building html HOT 7
- apparent typo in tutorial under "Testing Values: Booleans and Propositions"
- Can't even get started because of build issues HOT 5
- there is an extra ")" at the end of this line
- Numbering the exercises HOT 1
- Question about Chapter 5.3: delmin HOT 2
- Links to subsections don't work for me HOT 2
- Syntax of refinement types HOT 4
- Chapter 8 exercise "reverse" HOT 8
- Instructions for running LiquidHaskell HOT 2
- Figures 1.4 and 1.5 in Chapter 12
- Chapter 12 Exercise InsertRight HOT 4
- Current HEAD of main fails to build HOT 4
- Liquid Type Mismatch on Initial Build HOT 2
- Passing -fdefer-type-errors to GHC causes confusing errors from LH HOT 3
- Text description of "null" in Chapter 6 is reversed HOT 1
- Link is no longer available HOT 1
- Trouble with Chapter 11 HOT 3
- About Lemmas and other questions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquidhaskell-tutorial.