Five benefits to using StandaloneKindSignatures

GHC 8.10.1 is slated to be released soon, and among the improvements that it offers is the new StandaloneKindSignatures language extension. Standalone kind signatures (or “SAKS” for short) are like type signatures, except that they describe type-level declarations instead of term-level values. Here is one example of a standalone kind signature that describes the kind of a type synonym:

Continue reading »

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 »
Top