GithubHelp home page GithubHelp logo

Comments (6)

ranjitjhala avatar ranjitjhala commented on July 23, 2024

from liquidhaskell-tutorial.

hafizhmakmur avatar hafizhmakmur commented on July 23, 2024

So actually I'm still kinda stuck in the Sanitization exercise in Chapter 5 to the point even I skip it and back to it from time to time. As can be seen in this code my implementation is still unsafe somehow. I think I may have to make a specification too for testList to solve the problem but as you can see by this question, I also still haven't figured out how to create that. Could you refer me a resource for this "reflection"? Thank you very much. :D

from liquidhaskell-tutorial.

ranjitjhala avatar ranjitjhala commented on July 23, 2024

from liquidhaskell-tutorial.

hafizhmakmur avatar hafizhmakmur commented on July 23, 2024

It is a very exciting blog! It sounds like a foundational idea of Liquid Haskell. I wonder if you get some inspiration from this writing.
I still don't succeed in creating the function. My best attempt so far is in this code but it still have the same error (apart from realizing I should change Int to Nat).

from liquidhaskell-tutorial.

ranjitjhala avatar ranjitjhala commented on July 23, 2024

from liquidhaskell-tutorial.

hafizhmakmur avatar hafizhmakmur commented on July 23, 2024

Oh yeah before I have changed the Just (SP dim elts') to use the already sanitized type but then it was still not working so I changed it back. I've changed it back to your suggestion because well it makes much more sense

After some experiments and seeing your code, I've determined that the real problem is that the refiner doesn't really work around fst function. Here is the code where I change fst xs in favor of pattern recognision (see fromList and fromList') inspired by your code, and it works perfectly. I guess it's the same problem with null that I have discussed some time before. Thank you for your assistance!

(Btw I think I like my fromList' more. I think it's more coherent with the spirit of the function. Also inspired by that parse don't validate article!)

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.