Since we created the stack repo at the end of April, a tremendous amount of work has been done very rapidly. Now that Stack has a suite of features that make it excellent for most common use cases, it's a good time to step back and work on improving the code-base to make future enhancements easier and more reliable. We'll do one or two new releases, and then enter a stabilization phase. In particular, this will include:
- Refactoring build plan construction and execution
- Eliminating code duplication
- Properly integrate code that was copied/pasted from other projects
- Spinning off non-Stack-specific helper modules into separate packages
- More integration tests
- Bug fixes
- Performance optimization
During this period, minor pull requests with code cleanup, optimization, and additional tests will be gladly accepted, but please hold off on new features.
Some ways you can help:
- File issues identifying duplicate and sub-optimal code, and other quality issues
- Submit pull requests with code cleanup, optimization, and additional integration tests (stack test --flag stack:integration-tests enables them). Best to check first to avoid conflicts in code that is being overhauled.
- Github issue triage
During this period, pull requests with new features are unlikely to be merged, so probably best to hold off to avoid a bunch of bitrotted PRs.
Some things we're working on before beginning the stabilization phase:
Join our newly formed team of crack commandos (there are only two of us at this point) tasked with replatforming a flaky data import / export system to Haskell (from Java). This is the first Haskell project at the company and we plan (pray?) to knock it out of the park.
The right candidate is either: A senior developer (JVM experience preferred) with a hobbyist's level of Haskell foo and a keen interest in Haskell's particular flavor of functional programming - or a junior/mid-career developer with strong Haskell skills.
Send me an email: email@example.com by lasericus
[link] [10 comments]
Hello everyone, I'm rather new to haskell and emacs is usally my editor of choice, everything worked pretty ok so far but I ran into the following issue:
Writing if-then-else expressions indents like this when hitting enter and creating a new line:myAbs x = if x<0 then x*(-1) else x
when I use tab to "cycle" the indentation of 'then', I get the following, which will no longer change pressing tab again:myAbs x = if x<0 then x*(-1) else x
Based on the Haskell Wikibook I assume it is supposed to look like this:do first thing if condition then foo else bar third thing
So if I understand this correctly, bot possible indentations haskell-mode gives me are wrong? Is this intended from haskell-mode? If not, how do you achieve correct indentation in Emacs? Also, what is the correct way to indent if then else
Update: I think I do have a big confusion myself here, I now tried if within do and it formats it like in my last example. Are example #2 and example #3 correct?submitted by worst_mathematician
[link] [13 comments]
When starting a new project, should I try to use only Text?
i.e. do not use Stringsubmitted by alan_zimm
[link] [64 comments]
I've been finding scoped stateful computations useful - to compute a single state with StateT is fine and dandy, but what if you want to compute another stateful computation, that uses a different state type?
I really just want something like this combinator:withState' :: (s1 -> s2) -> (s2 -> s1) -> StateT s2 m a -> StateT s1 m a withState' to from x = do now <- get let (y, now') = runState x (to now) put (from now') return y
Does something like this exist somewhere in the deep, dark corners of Hackage that nobody touches? :|submitted by Spewface
[link] [11 comments]
I can't find a setup that I can get working.
I had a lot of failures installing haskell and cabal from Homebrew. I wasn't able to get all the ancillary pieces installed such as ghc-mod.
I'm also trying to get any of emacs, atom, or ST working with the relevant plugin. I got ST mostly working by cloning someone's unmerged branch, but I couldn't get all the haskell dependencies going.
Is GHC for Mac OSX the recommended way to go?
EDIT 2: GHC for Mac OSX can apparently work, but the current binary has been broken for a month. After installing, it's necessary to run stack install cabal-install.
EDIT 3: I can't stack install cabal-helper which is a requirement for ghc-mod and editor plugins. When building, it has an error loading a .so of some kind. Pretty long error trace.submitted by dogweather
[link] [23 comments]
Haskell noob here.
So I'm pretty sold on haskell being a good thing to know for a bunch of reasons. And by reading, I'm getting more reasons and becoming more familiar with the concepts. The problem is that I'm writing basically no code, just reading.
I'm a big fan of actually building things and I think to lock in the syntax and the concepts, and I need a decent project. I typically do web stuff, so I thought that would be a good choice. Basically, I'm not trying to do anything hard like make a compiler because I'd be struggling with an unfamiliar domain, syntax, and concepts all at once. At the same time, I don't want anything too superficial that won't encourage any repetition.
My thinking is that if I do something familiar and maybe even a bit repetitive, it will give me practice with the syntax and allow time for concepts to lock in.
Is this book (yesodweb) the way to go? I'm looking for the most stable framework to code against. It seems like this has the best docs and is the most stable. Good choice?
And back to the original question, how did you get through the grind? Willing to think outside the web if anyone has another compelling path.submitted by tailanyways
[link] [28 comments]
So, I just burned a lot of time debugging an issue that was caused by me passing an incorrect pointer from C back into Haskell -- a value with the wrong data type. Every guarantee I thought I was getting from GHC was violated, and I started getting back Data.Map's with billions of erroneous elements. When I asked about it in #GHC, they assumed it was a compiler bug on Windows (which I thought as well).
Anyway, it was totally my fault. But since Haskell is geared towards improving static assurances to prevent dumb programmers like me from shooting themselves in the foot: how could I have avoided these issues? How do you ensure that pointers are of the correct type when interfacing with foreign code? Is there an existing library that handles these dynamic checks for you?submitted by basil-slap
[link] [3 comments]