GithubHelp home page GithubHelp logo

Comments (17)

killtheliterate avatar killtheliterate commented on August 22, 2024

Seems stack runhaskell leap_test.hs is halfway there, but stack isn't finding the LeapYear module.

from haskell.

kytrinyx avatar kytrinyx commented on August 22, 2024

Ah, nice! When you figure it out, would you mind helping update the README?

Does the LeapYear module exist already, or did you fetch the exercise and is stack complaining because you still need to create it?

from haskell.

killtheliterate avatar killtheliterate commented on August 22, 2024

Yeah, definitely. It may be that cabal-install ends up being the most appropriate way, outside of making each excercism problem a stack project.

from haskell.

bassjacob avatar bassjacob commented on August 22, 2024

Alternatively, would you be open to a pr with some docs on how to use stack as a global pkg manager with the exercism problems? I'm happy to take a shot at writing it today.

I ran into this earlier and am reasonably confident I have it setup and working without each problem needing to be its own stack project.

from haskell.

killtheliterate avatar killtheliterate commented on August 22, 2024

I haven't been able to quite get it working. Got as far as stack install HUnit, and then stack exec foo.hs stops throwing errors about missing deps, but can't find the module under test.

It does seem excessive to make each problem a stack proj. As an end user, the only thing I really care about is not finding myself in "cabal hell" while just trying to learn. Looking forward to seeing what you've got working!

from haskell.

rbasso avatar rbasso commented on August 22, 2024

I agree, @killtheliterate. It would be too disruptive to make each problem a stack project.

Right now I was thinking in the possibility of creating a single exercise as a Stack project, to introduce it to people, but some more general changes would be needed to allow that, and I have no idea about what people here would think about it.

To allow a new stack project kind of exercise, the following files would require a complete rewriting:

  • .travis.yml
  • bin/check-exercises.hs

Maybe it's not worthy to change it if people are not having trouble compiling the sources...

Anyway, if anyone is interested in the subject, I have a repository with my solutions as stack projects and an improvised .travis.yml with cache enabled to run the tests.

from haskell.

bassjacob avatar bassjacob commented on August 22, 2024

@rbasso a how to use Stack for a single problem seems like a great starting point. I honestly wasn't even suggesting that far. I was thinking just

  • how to install it
  • how to install the required packages to your global config
  • what and where to name your solution to the problem
  • the command to run to test your solution

This approach would mean you don't have to bundle any of the stack specific code since it's essentially just being used as a cabal replacement, right? Is that worth documenting?

from haskell.

rbasso avatar rbasso commented on August 22, 2024

Sorry! I got that wrong!

Never thought of using Stack's global project. I just use cabal sandboxes and standard stack projects here.

Now I'm curious about how you use it and why!

from haskell.

bassjacob avatar bassjacob commented on August 22, 2024

Honestly, in this case just because reorganising exercism/haskell to easily use Stack seemed like more of a pain than it was worth, but I don't have cabal-install installed and had Stack.

Aside from that, to allow the use of ghci with installed packages without needing to be in a project?

from haskell.

rbasso avatar rbasso commented on August 22, 2024

Nice. Even without a project it seems better than the Haskell Platform.

$ stack setup
$ stack install HUnit
$ stack ghci
$ stack runghc leap_test

This is how am I supposed to use it?

ps: Worked in Debian (jessie) / Failed in NixOS (unstable) because of reference to /bin/bash.

from haskell.

bassjacob avatar bassjacob commented on August 22, 2024

yep, that's exactly what I did. Stable and easy. I'll write up a snippet for the Readme and open a PR later today?

from haskell.

rbasso avatar rbasso commented on August 22, 2024

Sounds nice. FYI, I don't have access to the repository. Sorry for the confusion.

The last merge was from @kytrinyx , 12 days ago.

from haskell.

kytrinyx avatar kytrinyx commented on August 22, 2024

Hi, sorry. I've been onboarding in a new job, and haven't checked in all week :/ I would be so grateful for a PR on the README!

from haskell.

bassjacob avatar bassjacob commented on August 22, 2024

No worries, I'll draft something simple now 👍

from haskell.

rbasso avatar rbasso commented on August 22, 2024

Considering #147 was merged, this issue should be Closed, right?

from haskell.

bassjacob avatar bassjacob commented on August 22, 2024

I guess so? @killtheliterate were those instructions close to what you wanted?

from haskell.

killtheliterate avatar killtheliterate commented on August 22, 2024

@subshad perfect! Thanks so much.

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.