This is my expression tree and related combinators https://github.com/phaazon/ash/blob/master/src/Ash.hs.
I’d like to type it in order to typecheck at compile time so that I can’t, for instance, right an addition of a floating value and an integral value. With the current implementation, I use a nasty L (for litteral) data to represent typed values at runtime, which sucks to me since I have to write a function typecheck :: E a -> Maybe TypeError.
Any idea?submitted by _skp
[link] [11 comments]
I have been a Haskell enthusiast for a while now, but haven't seriously committed to it on any large projects.
The combination of these things leads to this feeling:
- Though Haskell is used in some production settings, it doesn't have nearly the amount of use as the other languages/platforms I use.
- Sometimes things feel too easy. Like the fact that I don't have a thousand lines of framework setup and configuration. Or that I can just blindly put together things by their types and have them work.
- I don't really know what I would do if I ever did have a big problem, especially if this was for my individual business ventures (that is, no buckets of money to throw at the problem).
I am able to create software more easily, and it seems much more reliable, and this worries me.
Are these completely unfounded?submitted by fear-of-flying
[link] [34 comments]
It has recently been suggested to me that working with someone elses code might be a good way to break out of grown habits.
So I was thinking I will try to adopt an unmaintained project. Do you guys have any listings or proposals on which project might come in question? Other than that: Opinions on this idea?
Note: It's not that I have too much spare time, so I won't take on any projects that need a great amount of work to get to a usable state. More like embracing everything not invented here and try to work with what I get.submitted by goliatskipson
[link] [7 comments]
All though most people I talk to know me for my blog, I do occasionally actually write software instead of just talking about it :)
Sadly, as a mercurial user most of my stuff has languished with on bitbucket. I’ve had a few people tell me that this is annoying for various reasons. Yesterday, I finally got around to fixing that!
As of yesterday, all of my interesting projects are mirrored on [github][my-github]. I’m still using mercurial but thanks to the lovely git-hg tool this is not an issue. You can fork, pull-request, or generally peek and poke as you please. From my end all of these actions look like nice mercurial changesets so I can continue to live under my rock where I don’t need to understand Git.
As a quick list of what haskell code is up there now
I've been noticing dozens of recent Stack Overflow questions asking how to do things specifically with list comprehensions ("I want to write a function that uses list comprehensions...") ("I'm trying to use list comprehension to return the list elements that differ from the next.") or otherwise has a map or other operation shoehorned into a comprehension ("capitalise str = [ toUpper x | x <- str ]").
My assumption is that these are all telltales of homework assignments of the form "Using a list comprehension..." or just a teacher somewhere that's really partial to the sugar.
My sense is that list comprehensions in general are rarely idiomatic in "production" these days; rather, we prefer to use folds, map/fmap, scans, sometimes explicit recursion, or perhaps the monad with do. What's the community feeling on this topic?submitted by conklech
[link] [51 comments]