* The introduction of the DuplicateRecordFields language extension, allowing
multiple record types to declare fields of the same name
Holy hell. Is this the end of the Haskell record field names problem?
One of Haskell's great miseries has been that, because record field accessors are declared globally, you couldn't define records with fields of the same names:
data Person = Person { name :: String, age :: Int }
data Object = Object { name :: String, id :: UUID } -- error! `name` taken
The record issue is a widespread inconvenience, but ultimately nothing more than an inconvenience. Most people just prepended the type in their fields: 'person_name' and 'object_name'.
Some other issues might be:
* The Prelude is hard to update for compatibility reasons, so it clashes with modern Haskell somewhat. A lot of projects will roll their own prelude and add 'NoImplicitPrelude' to the project options.
* Deploying Haskell programs to older corporate servers is doable, but not at all obvious. Stick with C, Bash, and older Perls(5.8.8 is on my router) for maximum portability, if you expect to deploy to servers with a 10 year old image.
Record issue is more than just an inconvenience. I consider it a genuine issue. Having to add 2 lines of import (unqualified name of the type and qualified record module to get the accessors) for every record type you use is a pain. When you work with data-heavy code this ends up hundred of lines of import (see amazonka packages for instance where each request has a record type).
Even if it doubles the number of import statements, I still don't see how that is more than an inconvenience. Having said that, the record issue alone is not the only reason to need qualified imports (as they are also used to resolve collisions of functions that are not auto generated from records).
What would be nice is if Haskell would allow any name collision so long as it could use the type system to disambiguate the function.
Your argument generalizes to "The lack of any feature that can be worked around is an inconvenience", which, okay, but it's not a very useful statement. By that definition, lots of really important things are inconveniences.
Idris[1] already has a working system for this, and it's type system is more complicated (it has much more support for dependent typing). It allows this principle for regular function names as well.
You can't link glibc statically for technical reasons. In some sense, this is the only problem I had. If there was a way to use an alternate libc, it would probably eliminate this issue entirely.
I know there was some work to do a musl and or alpine Linux build. Or both, probably easy to google. Also I'm moderately certain that ghc on FreeBSD and Mac don't need glibc ;)
Targeting musl works out of the box with the musl toolchain and once you have a musl build you can build another ghc with that one with musl as the host.
I haven't tried building a statically linked musl ghc, and I honestly don't know how, but it'd be great to figure out. Any pointers? Speaking of static musl builds, that can be a good choice to create a single bindist of GHC that works on CentOS, Debian, Alpine, and any other Linux distro. Seeing how Docker defaults to Alpine images, it could be beneficial in that regard as well.
There was a large (but informal) survey done on /r/haskell (one of the largest Haskell communities) last month about "Why Haskell sucks". The results were collated into a presentation linked below. It's a very detailed review that covers just about everything "bad" about Haskell (though I think it views each issue rather optimistically).
I actually quite like this limitation. It encourages you to separate data structures into their own modules and use qualified names to access their member data, which I think is often the right idea.
I've never encountered a situation in which the One File - One Module imposed convention was problematic. I also find it greatly helps when reading new Haskell code bases. I think it's generally a sign of good project design when there are lots and lots of small files, each with one data structure and a few associated functions.
For most of what I want, being able to introduce additional namespaces would be good enough. Making them modules as well could open the doors to some need techniques.
(I don't need multiple namespaces per file so much for the finished program, but it's handy when developing.)
* Significant improvements in error message readability and
content, including facilities for libraries to provide custom
error messages, more aggressive warnings for fragile rewrite
rules, and more helpful errors for missing imports.
I'm really excited about this. Any push towards more decipherable error messages should be huge in increasing adoption (which leads to more awesome libraries and opportunities to use it for our day jobs).
The FPComplete guys will probably have it up on Stackage in a few days. You can still use it by adding the tarball to your stack.yml, and maybe adding the 'allow-newer: true' flag:
> I'm looking forward to trying out the new debugging support: gdb was unusable with older GHCs.
Indeed; it should be slightly better now but as the documentation says, there are still plenty of rough edges. I certainly wouldn't recommend it for day-to-day use. I have a patch set in the works which ought to fix the remaining issues so hopefully 8.2 will finally be usable.
However, in my experience the implicit callstack functionality along with the ability to provide callstacks from profiling information greatly reduces the need for DWARF unwinding for debugging (low-cost profiling, on the other hand, it may still be quite useful for).
The new Sphinx based documentation has many code sample boxes where the content overflows and the rectange is smaller than the text which doesn't fit into the rendered HTML/PDF. Is this a common issue with Sphinx?
One of Haskell's great miseries has been that, because record field accessors are declared globally, you couldn't define records with fields of the same names:
--Edit: Info on the extension at: https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedReco.... Looks like it creates ambiguity in some cases.