Git Product home page Git Product logo

Comments (3)

stevana avatar stevana commented on May 26, 2024

Is GH the appropriate forum to ask newbie questions?

Sure! Bad documentation is a bug after all...

Which part of this is the QC test and which part is the core implementation? I'm guessing these lines are the core implementation of the ticket dispenser, right?

That's right.

Looking at the way the core implementation has been written, and what's written in the README as well, i.e. a datatype of commands;, does it basically mean that the app needs to be structured like an Elm/React app?

I've never seen an Elm or React app, but the library should not force you to structure your program in any particular way -- if you feel that it does then please report a bug.

I'm assuming this is the simplified model against which the real model is being tested, right?

That's right.

What is the phantom type refs for?

The library has built in support for reference-like constructs -- that's what refs is for. The ticket dispenser example doesn't use any reference-like constructs and hence doesn't use refs, but if you look at for example the mutable reference example you'll see how refs can be used...

Why is a complicated GADT required for the app-wide Action data model? Is it because an Action is conceptually a representation of a function call which can accept any data-type and return any data-type?

Yes, in this case it's a representation of a function call.

Which also brings me to the next question, what if TakeTicket could accept the number of tickets the user wants to take? What would the Action type look like, in that case?

  TakeTicket :: Int -> Action refs ('Response Int)

Any further explanation of what the type signature of semantics means and why is it so complicated?

I will open a PR where I add some more comments to that function during the day, I'll cc you.

from quickcheck-state-machine.

stevana avatar stevana commented on May 26, 2024

@saurabhnanda: We made a big refactor of the API in PR #129, could you please revisit the example and check if you find it any easier to understand now? Cheers.

from quickcheck-state-machine.

stevana avatar stevana commented on May 26, 2024

Closing; feel free to reopen if you got further questions!

from quickcheck-state-machine.

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.