Fri 17 Mar 2023

The friendship between Haskell and C

If ever there were two programming languages said to be at odds with one another, it might be Haskell and C. But this is not so true as it seems; they can play quite nicely with one another. Haskell’s foreign function interface lets us write Haskell code that uses libraries of other languages — notably, C.

As a brief introduction to how Haskell FFI works, I’ll be talking about my memfd package, which is available on Hackage.

Source: The friendship between Haskell and C, an article by Chris Martin.

Temporary lifetimes

Rust’s rules on temporary lifetimes often work well but have some sharp edges. The 2024 edition offers us a chance to adjust these rules. Since those adjustments change the times when destructors run, they must be done over an edition.

Source: Temporary lifetimes, an article by Niko Matsakis.


A functor between two categories (let’s call them A and B) consists of two mappings - a mapping that maps each object in A to an object in B and a mapping that maps each morphism between any objects in A to a morphism between objects in B, in a way that preserves the structure of the category.

Source: Category Theory Illustrated - Functors.