GithubHelp home page GithubHelp logo

Add type information. about haskell HOT 3 CLOSED

exercism avatar exercism commented on July 21, 2024
Add type information.

from haskell.

Comments (3)

etrepum avatar etrepum commented on July 21, 2024

In some cases there's a bit of flexibility to what types you can use for a given exercise, and part of the challenge is coming up with the right types. I could go either way on this. If you don't provide types, or use typed holes, then the compiler will tell you what the necessary types are.

from haskell.

joneshf avatar joneshf commented on July 21, 2024

Yeah, I can see both sides. But I think it's way more instructive to not have to struggle though the types. Ideally you'd not have to look at the test file at all to see what types are necessary.

Maybe this could happen piecemeal. For exercises where the type is part of the goal, don't provide an explicit type signature. But for ones where the type is largely irrelevant to the exercise, no need in struggling with that as well.

from haskell.

etrepum avatar etrepum commented on July 21, 2024

I'll leave that up to your discretion, please feel free to submit pull requests to add comments and/or stub files for exercises where you think this would be most helpful. I'll close this issue and those can be handled on a case by case basis.

In many cases the types are opaque to the tests, and it's better to leave the actual definition of the type to the discretion of the person completing the exercise. There are often many valid ways to define a type, and even when only one type truly makes sense there's plenty that can be learned from by going down the wrong path.

from haskell.

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.