Generic programming is a powerful way to define a function that works in an analogous way for a class of types. In this article, I describe the latest approach to generic programming that is implemented in GHC. This approach goes back to the paper *A Generic Deriving Mechanism for Haskell* by José Pedro Magalhães, Atze Dijkstra, Johan Jeuring, and Andres Löh. Continue reading

# Constrained monads

There are Haskell types that have an associated monad structure, but cannot be made instances of the `Monad`

class. The reason is typically that the *return* or the *bind* operation of such a type `m`

has a constraint on the type parameter of `m`

. As a result, all the nice library support for monads is unusable for such types. This problem is called the constrained-monad problem.

In my article *The Constraint kind*, I described a solution to this problem, which involved changing the

`Monad`

class. In this article, I present a solution that works with the standard `Monad`

class. This solution has been developed by Neil Sculthorpe, Jan Bracker, George Giorgidze, and Andy Gill. It is described in their paper *The Constrained-Monad Problem*and implemented in the

*constrained-normal*package. Continue reading

# MIU in Curry

More than two years ago, my colleague Denis Firsov and I gave a series of three Theory Lunch talks about the MIU string rewriting system from Douglas Hofstadter’s MU puzzle. The first talk was about a Haskell implementation of MIU, the second talk was an introduction to the functional logic programming language Curry, and the third talk was about a Curry implementation of MIU. The blog articles *MIU in Haskell* and *A taste of Curry* are write-ups of the first two talks. However, a write-up of the third talk has never seen the light of day so far. This is changed with this article. Continue reading

# Grapefruit updated

Yesterday, I updated the Grapefruit FRP library once again, this time to make it compatible with GHC 7.8. Continue reading

# List of publications and talks updated

The list of publications and talks on my website has been pretty much out of date. Now it is updated, for you to enjoy.

# Hyperreal numbers on Estonian TV

On 13 February, I talked about hyperreal numbers in the Theory Lunch. I have not yet managed to write a blog article about this, but my notes on the whiteboard have already been featured on Estonian TV. Continue reading

# ucs 2.2 released

I have released a new version of the LaTeX *ucs* package yesterday, which is version 2.2. It fixes the bug that is described in the TeX StackExchange question *Conflict between ifxetex and ucs under pdflatex/xelatex – why?*.