News aggregator


Haskell on Reddit - Wed, 12/10/2014 - 3:32pm

An experiment in Haskell web services. Runs quicksort on a mutable array (using a heap to repeatedly partition the smallest available interval) and pushes 'swap' and 'partition' events to the client via websocket for visualization using D3.js.

Running on Heroku at:


submitted by void_fraction
[link] [4 comments]
Categories: Incoming News

Neil Mitchell: Beta testing the Windows Minimal GHC Installer

Planet Haskell - Wed, 12/10/2014 - 3:27pm

Summary: There is now a minimal Windows GHC installer that can install the network library.

Michael Snoyman and I are seeking beta testers for our new Windows GHC installer. The installer is very new, and we're keen to get feedback.

Update: If you want to install to Program Files (the default installation path), download the file, right click and hit "Run as administrator". This will be automatic in the next version.

One of the standard problems when upgrading Haskell libraries on Windows is that sometimes you have to upgrade a package which requires a configure script - typically the network library. When that happens, you have to take special measures, and even then, sometimes the binary will fail at runtime (this happens on about half my machines).

Our installer solves that problem by bundling GHC, Cabal and MSYS in one installer. You can install the network library out of the box without any special configuration and it just works.

Our installer does not provide all the packages included with the Haskell Platform, but it does provide an environment where you can easily install those packages. This minimal installer might be more suitable for developers.

Why might I want this installer

The installer is much easier to install than the GHC distribution (has a real installer, sets up the %PATH%, includes Cabal and can build the network library).

The installer has less libraries than the Haskell Platform installer, but includes MSYS so you can build everything in the Platform. The lack of additional packages and close correspondence with GHC (there is one installer for each GHC version) might make it more suitable for library developers. Once GHC 7.10.1 is released, we hope to make a GHC Minimal Installer available within days.

The installer also has more precise control over what is added to the %PATH%. You can add all the binaries it provides, or just add a single binary minghc-7.8.3 which when run at the command prompt temporarily adds all the installed binaries to the %PATH%. Using the switcher, you can easily switch GHC versions.

Categories: Offsite Blogs

Compose Conference Registration Now Open [NYC, Jan 30 - Feb 1]

Haskell on Reddit - Wed, 12/10/2014 - 12:50pm


Call for Participation

Compose Conference 2015

January 30 - February 1, 2015 New York, NY


The practice and craft of functional programming :: Conference

Compose is a new conference for typed functional programmers, focused specifically on Haskell, OCaml, F#, SML, and related technologies.

Typed functional programming has been taken up widely, by industry and hobbyists alike. For many of us it has renewed our belief that code should be beautiful, and that programming can be as enjoyable as it is practical. Compose is about bringing together functional programmers of all levels of skill and experience — from technical leads to novices, and from long-time hackers to students just getting started.

It will feature a Friday night keynote by Stephanie Weirich on dependent type theory, a Saturday of great talks and presentations, and a Sunday unconference and code-in with hacking, tutorials, and mentoring.

In the days before and after Compose (Jan. 29-30 and Feb. 2-3), Well-Typed and Skills Matter are organizing commercial, paid Haskell tutorials by Duncan Coutts. Further information is available on the Well-Typed blog:

submitted by gbaz1
[link] [2 comments]
Categories: Incoming News

JP Moresmau: Using Ansi console for nicer console output in EclipseFP

Planet Haskell - Wed, 12/10/2014 - 10:24am
A little tip from the trenches (-:. I use the Ansi Console plugin in EclipseFP to be able to see a nice color output from my Haskell executable runs.

For example, the Tasty example:

Works also for Yesod applications, etc.

Note that some support for Tasty is being added in EclipseFP 2.6.3, to at least provide some templates for the cabal test-suite section and test modules. I'm not too sure if it's worth to develop a runner for it, since contrary to HTF we won't have a link to the source, so the standard output is probably nice enough.

Happy Haskell Hacking!

Categories: Offsite Blogs


Haskell on Reddit - Wed, 12/10/2014 - 10:19am
Categories: Incoming News

Imagine... (x-post from /r/functionalprogramming)

Haskell on Reddit - Wed, 12/10/2014 - 10:03am
Imagine no iteration, It's easy if you try, No state below us, Above us only Y, Imagine all the people, Coding with lambdas... Imagine no mutation It isn't hard to do Nothing to deadlock And no pointers too Imagine all the people Coding in Haskell... You may say I'm no hacker But I'm not the only one I hope someday you'll join us And compsci will be as one Imagine no frustration I wonder if you can No need for state or pointers A world of monads Imagine all the people Programming in peace... You may say I'm no hacker But I'm not the only one I hope someday you'll join us And compsci will be as one submitted by Closures
[link] [1 comment]
Categories: Incoming News

Type systems and logic - Wed, 12/10/2014 - 12:05am
Categories: Offsite Blogs

Type systems and logic - Wed, 12/10/2014 - 12:05am
Categories: Offsite Blogs

Philip Wadler: How to save US

Planet Haskell - Tue, 12/09/2014 - 11:09pm
A short, inventively presented, video from Lawrence Lessig, making the case that before we can solve all the other problems in the US, the first problem we must solve is to take big money out of politics, and how we can do it via Mayday.
Categories: Offsite Blogs

Philip Wadler: SNAPL update

Planet Haskell - Tue, 12/09/2014 - 10:39pm
SNAPL, taking place 3-6 May in Asilomar, now has a publisher. Proceedings will appear in the LIPIcs series published by Dagstuhl. Five pages in ACM style is about eight pages in LIPIcs style, so the SNAPL call for papers has changed the paper length accordingly.

Previously: SNAPL.
Categories: Offsite Blogs

Libraries for using regexes on Text

Haskell on Reddit - Tue, 12/09/2014 - 10:29pm

Are there any libraries for using regexes with the Text type that have a friendlier API than text-icu? And for String, which is the preferred regex library?

submitted by seriousreddit
[link] [15 comments]
Categories: Incoming News - Tue, 12/09/2014 - 9:15pm
Categories: Offsite Blogs - Tue, 12/09/2014 - 9:15pm
Categories: Offsite Blogs

Oliver Charles: 24 Days of GHC Extensions: Nullary Type Classes

Planet Haskell - Tue, 12/09/2014 - 6:00pm

While I wait for a few more guest posts to soldify, I thought it might be fun to look at another new extension to GHC - NullaryTypeClasses.

> {-# LANGUAGE NullaryTypeClasses #-}

Ordinarily in Haskell, a type class is defined as the following:

class ctx => C a where ...

That is, our type class can have a context, and can operate on a single type parameter. However, working with one type is a restriction - later, we’ll see about working with multiple type parameters is there any reason we couldn’t work on no type parameters?

It sounds crazy, but GHC can do just that! The linked documentation has one scenario of when you may want to do that - if you need to make a controversial assumption, by using a nullary type class you can give your end users the choice as to whether or not they want to commit to using code that requires that assumption to hold.

However, nullary type classes can also be used as a form of implicit configuration. For example, let’s assume we’re building a Haskell library, and we’d like to give our users the ability to log its activity. There are many ways to log messages these days - in development we might use STDERR, but in production we might push our logs directly to journald or syslog.

By using nullary type classes, we can abstract over this logging function, and let the end user provide a logging strategy. To begin, we define our type class, mostly as normal - but we don’t use any type parameters:

> class Logger where > logMessage :: String -> IO ()

The presence of this type class allows us to call logMessage, but defer the implementation to the user of the library:

> type Present = String > queueNewChristmasPresents :: Logger => [Present] -> IO () > queueNewChristmasPresents presents = do > mapM (logMessage . ("Queueing present for delivery: " ++)) presents > return ()

Notice how our library function clearly indicates the assumption - here we are assuming that it will be possible to log a message, using IO.

Now to provide a logging implementation, all we have to do is provide the instance for the Logger type class:

> instance Logger where > logMessage t = putStrLn ("[XMAS LOG]: " ++ t)

Running our library function does just what we would expect:

.> queueNewChristmasPresents ["Cuddly Lambda", "Gamma Christmas Pudding"] [XMAS LOG]: Queueing present for delivery: Cuddly Lambda [XMAS LOG]: Queueing present for delivery: Gamma Christmas Pudding


If you’re feeling a little uncomfortable now - I’m with you. It’s not clear to me whether this is really a good idea or not, but it’s nice that it is available in GHC. In a future post we’ll look at another extension that attempts to solve the implicit configuration problem.

This post is part of 24 Days of GHC Extensions - for more posts like this, check out the calendar.

Categories: Offsite Blogs