News aggregator

Hom - React.JS for Haskell!

Haskell on Reddit - Tue, 05/20/2014 - 7:06am
Categories: Incoming News

FP Complete: Stackage Server

Planet Haskell - Tue, 05/20/2014 - 5:46am

Stackage is an infrastructure to create stable builds of complete package sets (henceforth we call them “snapshots”). Think “stable Hackage”. Let's recap.

As a user

By running automated builds before releasing a new snapshot, Stackage gives the following assurances:

  • There is always a build plan.¹
  • All packages actually compile.²
  • All tests suites pass.
  • All of the above work across three GHC versions.

This means that as a user of an snapshot verified by Stackage, you can expect all packages to install first time.

Also, we are currently building on these GHC versions:

  • GHC 7.8 (2014)
  • GHC 7.6 (2013)
  • GHC 7.4 (2012)

This gives plenty of time to update your GHC versions in a gradual manner.

Each snapshot is given a unique hash which is a digest of that snapshot's package set. Snapshots don't change. Once you have the hash, it refers only to that snapshot. So if you write a project using snapshot aba1b51af, and in two months you switch to another machine and build your project with aba1b51af, it will succeed. You can continue hacking without hopping onto the Hackage treadmill.

¹ A build plan refers to the process Cabal makes when trying to install the dependencies of a package and then the package itself: it determines which packages are candidates by their version restrictions and produces a list of package versions that it will install. This is part I of version hell.

² Versions don't necessarily mean a package really compiles, just that the author thought it might or did on their platform. This is part II of version hell.

As an author

To have the knowledge that your package builds and tests successfully across the current, stable and old GHC versions is valuable information. As a library author, you have guarantees that users of Stackage can easily use your library and can do so on a reasonable number of GHCs.

You're also informed, as an author, when a newly uploaded package breaks yours, meaning it's time to update your package if you want to be included in the latest snapshot.

In the two years since the initial announcement, library authors have been submitting their packages and contributing to this process. The steps are simple:³

Some examples:

Once you have submitted the pull request, a build will be started. There is a dedicated jenkins server at this location: From here you can track the progress, status and results of Stackage builds.

If there is a problem, you will get a ping notifying you that there is a build problem. Once the problem is fixed, that change will be accepted into the next Stackage snapshot.

Later on, if the uploading of a new package breaks your package, you will be pinged to update.

For example, here is an issue created when haskell-src-exts bumped to 1.15.0. Each author of the packages were notified, made updates, and now we had a new snapshot.

³ It's a little similar to the submission process of MELPA, if you've heard of it.

Enter Stackage server

In the past, use of Stackage was limited to either manually downloading the project and building it all locally, or by using FP Haskell Center. In the coming month, we will be announcing for beta testing a new project, based on the Stackage infrastructure: Stackage server.

Upon release, you will be able to go to the server web site and pick a snapshot. On the build will be a simple copy/paste line to use as a Cabal repo, to replace your existing remote-repo line.

remote-repo: stackage:http://the-stackage-server/stackage/ab547ab2ba

Do a cabal update and you're set! You now have all the advantages listed in the users section. Everything will build in your cabal now.⁴

When a new package is released and has been properly updated via the process explained for authors, if you want that package, you can go to the Stackage home page and get the latest snapshot and update your repo.

We will also support uploading custom snapshots, so: as a company, as a Linux distribution, organisation, a university, or just as a general hacker who wants to keep all their projects under one package set, you can maintain your own custom series of snapshots, and also make it available to other people. Of course, then the burden will be on you to make sure it builds, rather than the recommended snapshots which we maintain and to which authors contribute.

⁴ It will be suggested on the web site that you start from a base install, with either instructions of how to clear your setup or start from scratch.

Exclusive and inclusive Stackages

Stackage doesn't include all of Hackage. So sometimes there will be packages that you want, which aren't included on Stackage. This means it's not certain that they will build or their tests will pass. However, we will distinguish between two types of snapshots:

  1. Exclusive: includes only the packages vetted by the Stackage process, all packages build and pass tests. It will always work.
  2. Inclusive: includes the packages vetted by the Stackage process, and also any additional packages from Hackage are available, should you wish to try installing them. It won't always work.

Which one you choose will depend on how “bleeding edge” you want to be.


To compare with other approaches, here's a quick rundown:

  1. Hackage: super unstable, lots of build problems, but bleeding edge, loads of new packages.
  2. Haskell Platform: super stable and vetted by consensus, no build problems (unless combined with Hackage), but packages tend to be older and not many packages (about 30, or loads when combined with Hackage).
  3. Stackage inclusive: stable and no build problems (unless combined with Hackage), recent packages and many of them (about 550, or loads when combined with Hackage).
  4. Stackage exclusive: stable, no build problems, with recent packages and many of them (about 550).

Though, we also do snapshots which are based upon the Haskell Platform. This is especially important for Windows users.

App writers

An additional use-case not mentioned so far is for application writers. Programs that have lots of very particular dependencies. FP Haskell Center itself is such a piece of software. Any Haskeller who's worked on a big program knows that it's important to freeze all dependency versions so that:

  1. Builds always work.
  2. Tests always succeed.
  3. Build results and runtime results don't vary from developer to developer.

There are various ways to tackle such a problem. I've seen all of them used in places I've worked or talked to about it:

  1. Just specify no versions in your project Cabal file, strap yourself in, scream “cowabunga,” and hope for the best.
  2. Specify hard versions in your Cabal file. This leads to transient dependency differences.
  3. Specify hard versions for all packages, directly and indirectly used by your project.
  4. Run a local Hackage on your office network or VPN or publicly passworded, which contains only the package versions which your project is using/should be using. (With this method you have to be careful not to accidentally upload to real Hackage when doing updates!)
  5. Write a script which will reinstall all direct and transient dependencies whenever a package is updated.

Stackage is another way to do this. Similar to the local Hackage approach, you, as an author, or as a team of developers, would choose a snapshot to build your application against. Everyone shares the same remote-repo.

Now if random Billy Opensauce wants to contribute to your big project, and wants to be able to build it, all you have to do is tell them to make a cabal sandbox and use the snapshot that your project builds with and it will work for him first time.

This is a bit like doing cabal freeze. Although one handy side-effect is that you can have a big program consisting of many sub-systems, and they all just specify e.g. text in their dependency, and your whole project depends upon a snapshot, rather than keeping n .cabal build-depends entries in sync.

Haskell businesses

We're also offering custom installations for businesses who want to build their development platform upon Stackage. If you're considering this for your business and want to find out more, please email us at:

Coming release

The next stable Stackage snapshot will be on GHC 7.8 (and included in the FP Haskell Center). This means that if you want your packages on that snapshot, you should submit them ahead of time. Currently we have 552 packages available on GHC 7.8. Submit your packages or packages you like and let's get them building!

Categories: Offsite Blogs

Stackage Server

Haskell on Reddit - Tue, 05/20/2014 - 4:41am
Categories: Incoming News

Is it reasonable to drop Haskell98 compat in new code?

Haskell on Reddit - Tue, 05/20/2014 - 3:32am

The only reason I could think of is to be able to compile the code with compilers prior to GHC 7.0, but by now also non-GHC compilers such as JHC do support Haskell2010, don't they?

Is there any (good) reason not to use Default-Language: Haskell2010 for new code, and basically drop support for GHC<7 which don't support `-XHaskell2010` (while trying to stay compatible with GHC>=7)? Are GHC 6.* users still out there whose suffering would increase by this choice?

submitted by RedLambda
[link] [9 comments]
Categories: Incoming News

As somebody who is learning Haskell, is there something I can build alongside to grasp the material better?

Haskell on Reddit - Mon, 05/19/2014 - 11:19pm

Hey everyone!

I am teaching myself Haskell using Learn you a Haskell. Is there something I could build alongside to drill the concepts home? Something that can incorporate the concepts that the book covers and grow in functionality as the book delves deeper into the awesomeness of Haskell?

Thanks in advance!

submitted by uglyBaby
[link] [11 comments]
Categories: Incoming News

if you're finding cabal can't build your project and transformers and transformers-compat is in the transitive deps, heres what do do.

Haskell on Reddit - Mon, 05/19/2014 - 9:57pm

theres been a huge rash of breakages relating to transformers 0.4 landing on hackage.

Not transformers fault, more like a perfect storm of other issues, mostly relating to how cabal-install's current solver gets a bit stuck when choosing flags that dictate which dependency constraints to solve. Some fixes are in the work for cabal-install ( a huge thanks to them).

In the mean time, an easy fix is:

cabal install transformers-compat -ftransformers3 cabal install mtl-

the issue is that the cabal install solver gets a bit stuck picking -ftransformers2 for many install plans, and this gets folks into having some pretty confusing cabal-install errors.

there are probably other valid work arounds, but the one I suggest above seems to help everyone who hits this issue.

Note that you actually need to do these steps before doing your normal cabal-install routine, and baking them into your Foo.cabal package file WILL NOT fix the problem.

Real fixes for cabal-install are in the works, this is just a near term mitigation

submitted by cartazio
[link] [9 comments]
Categories: Incoming News

In what ways are categorical logic and type theory different?

Haskell on Reddit - Mon, 05/19/2014 - 9:00pm

They seem very similar from what I have read. I would imagine that HoTT is very different due to homotopy, but that's all I can say about it.

submitted by deltaSquee
[link] [22 comments]
Categories: Incoming News

HaL-9 registration open

General haskell list - Mon, 05/19/2014 - 8:03pm
A message for German Haskell users follows: ------------------------------------ HaL ist ein lokaler Haskell-Workshop mit überregionaler Bedeutung, der nun bereits das 9. Mal stattfindet. Dieses Jahr laden wir für den 20. Juni ins Institut für Informatik an der Martin-Luther-Universität Halle-Wittenberg ein. Das Programm für HaL-9 kann man herunterladen von: Es wird noch kleinere Änderungen und Erweiterungen geben. Das endgültige Programm werden wir beim Empfang austeilen. Anmelden kann man sich unter: Anmeldeschluss ist 2014-06-11. Frühes Anmelden sichert Plätze in den beliebtesten Tutorien! Viele Grüße Henning Thielemann
Categories: Incoming News

ANNOUNCE: New OpenGL packages

haskell-cafe - Mon, 05/19/2014 - 4:53pm
New versions of the OpenGL packages are available on Hackage: * OpenGLRaw * GLURaw * OpenGL * GLUT Cheers, S. ====================================================================== Changes in the OpenGLRaw package ====================================================================== * Don't rely on K&R features in CPP, making things easier for Mac/clang users. * Added support for OpenGL 3.2's glGetInteger64i_v and the following extensions, so now all parts of OpenGL 4.1 are supported (plus a few more): APPLE_flush_buffer_range APPLE_vertex_array_object ARB_blend_func_extended ARB_gpu_shader_fp64 ARB_sampler_objects ARB_shader_subroutine ARB_shading_language_include ARB_texture_compression_bptc ARB_texture_rgb10_a2ui ARB_texture_swizzle ARB_transform_feedback2 ARB_vertex_attrib_64bit ARB_vertex_type_2_10_10_10_rev EXT_draw_buffers2 EXT_framebuffer_b
Categories: Offsite Discussion

instance Alternative (Either [a])

haskell-cafe - Mon, 05/19/2014 - 4:31pm
Hi guys! I'd like to implement the instance in the subject: instance Alternative (Either [a]) However the instance in Control.Monad.Trans.Error.Error gets in the way... I cannot use this one, it works only with Strings. My use case is that the Either handle in the Right a final value, or else in the Left a list of things "left to do" to compute the value. How can I do? Thanks! Corentin _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Haskell Developer - Job Opening - New York, NY

haskell-cafe - Mon, 05/19/2014 - 3:40pm is seeking a Haskell developer to improve and maintain our Snap-based web application stack. is committed to using the best tool for the job throughout our software stack. That includes a mixture of cutting-edge tools like Haskell and the Nix package manager as well as tried-and-true products like PostgreSQL and Linux. Your role will be to find, use, and create tools like these to build a robust and powerful software platform to serve our clients' needs. This job requires that you be able to hit the ground running with Haskell. As part of your application, please submit a small to medium sized code sample (approximately 100 to 1000 lines) demonstrating your ability to write clear, concise, and efficient Haskell code, together with a brief English explanation of what the code does, how it works, and how to build and run it. Your Haskell code is our primary consideration in reviewing your application. However, experience with PostgreSQL, Linux, NixOS, web server programming, Varnish,
Categories: Offsite Discussion