Four ways to partially apply constraint tuples

Tuples, aside from their weird syntax, are just like any other data type. You can even partially apply a tuple type constructor by writing it in “prefix” style. For instance, (Int, Bool) and (,) Int Bool are two ways of writing the same type. This flexibility allows tuples to be manipulated in all the ways we’re used to in Haskell.

Continue reading »

The surprising rigidness of higher-rank kinds

Higher-rank types are a very widely used feature in GHC. The RankNTypes language extension, which enables the use of higher-rank types, has been around since GHC 6.8.1 (released in November 2007), and by one metric, RankNTypes is the 15th most popular language extension in use today [1].

  1. According to Anish Tondwalkar’s blog post 

Continue reading »

On the arity of type families

Partial application is one of the most useful tools in a Haskell programmer’s toolbelt. Since functions are just data, they can be passed around without being supplied any arguments, just as one would with any other value. Due to the ubiquity of higher-order functions in Haskell, the ability to partially apply things is extremely useful.

Continue reading »

Visible dependent quantification in Haskell

This post is based off of a talk I gave on March 8, 2019, that was unfortunately not recorded. In lieu of video, I decided to write this blog post so that I could share it with others. The slides of the talk are available here, although you do not need to read them in order to understand this post.

Continue reading »
Top