GithubHelp home page GithubHelp logo

Comments (21)

nikivazou avatar nikivazou commented on June 24, 2024

@christetreault you can take a look here for 3.2:

http://goto.ucsd.edu:8090/index.html#?demo=permalink%2F1423863481.hs

from liquidhaskell-tutorial.

christetreault avatar christetreault commented on June 24, 2024

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.

doesnt_work

from liquidhaskell-tutorial.

nikivazou avatar nikivazou commented on June 24, 2024

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.

christetreault avatar christetreault commented on June 24, 2024

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.

nikivazou avatar nikivazou commented on June 24, 2024

Maybe. Can you please do a make test to see what else is broken in your current setup?

from liquidhaskell-tutorial.

christetreault avatar christetreault commented on June 24, 2024

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.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

OK, I think I know the problem (@gridaphobe : I fear its DIFFCHECK)

@christetreault can you do this:

  1. Use exactly the same signature as you have in the screenshot above,
  2. 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.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

@christetreault do it on the version you have -- no need to rebuild.

from liquidhaskell-tutorial.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

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.

christetreault avatar christetreault commented on June 24, 2024

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.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

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.

gridaphobe avatar gridaphobe commented on June 24, 2024

@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.

christetreault avatar christetreault commented on June 24, 2024

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.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

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.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

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.

gridaphobe avatar gridaphobe commented on June 24, 2024

@ranjitjhala most major-modes (including haskell-mode) provide functions to determine the function-at-point :)

from liquidhaskell-tutorial.

gridaphobe avatar gridaphobe commented on June 24, 2024

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.

gridaphobe avatar gridaphobe commented on June 24, 2024

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.

ranjitjhala avatar ranjitjhala commented on June 24, 2024

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.

christetreault avatar christetreault commented on June 24, 2024

This issue should be closed after PR #27 is merged

from liquidhaskell-tutorial.

christetreault avatar christetreault commented on June 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.