Comments (17)
Seems stack runhaskell leap_test.hs
is halfway there, but stack isn't finding the LeapYear
module.
from haskell.
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.
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.
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.
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.
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.ymlbin/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.
@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.
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.
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.
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.
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.
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.
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.
No worries, I'll draft something simple now 👍
from haskell.
Considering #147 was merged, this issue should be Closed, right?
from haskell.
I guess so? @killtheliterate were those instructions close to what you wanted?
from haskell.
@subshad perfect! Thanks so much.
from haskell.
Related Issues (20)
- Feature Request: Autogenerate template files with instructions for exercise development HOT 3
- Add a disclaimer about version constraints and Stackage
- [Learning Mode] Discussion: How do we best introduce case-expressions? HOT 5
- [Learning Mode] Discussion: building up to Pattern Matching HOT 26
- Which memoization library to use? HOT 3
- [Learning Mode] make learning track visible HOT 1
- Build error (connection failure, `Cabal file info not found...`) HOT 2
- Continuation of development of Learning Mode? HOT 3
- Intention behind not updating a Queen Attack test HOT 2
- docs: contributing instructions regarding versioning are out of date HOT 2
- Binary Search Tree: add test cases for `bstRight`, `bstLeft` HOT 5
- README: Replace outdated information about hints.md with correct information
- Are hints.md files rendering properly? HOT 1
- Add test to check for eligible boards where queen is on rightmost column in queen attack HOT 3
- Exercise Zipper: instruction is out of date HOT 1
- Building a training set of tags for haskell HOT 21
- exercism cli not installing most recent version of project template HOT 2
- Roman numerals doesn't test for Nothing HOT 1
- Phone Number exercise tests are out of sync with problem-specifications HOT 1
- CI is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell.