Recently in category theory Category

Laws on the cheap

| | Comments (0) | TrackBacks (0)

While we're on the topic, here's something that's been bugging me for a few years now.

There are three monad laws in Haskell, and they make a lot of sense, especially when you write them in do-notation form. They're very-well motivated, and they're clean.

Arrows are a very pretty generalisation of "notions of computation" (you can think of them as extending monads to not-just-straight-line computation). However, some of the laws that they obey are much more poorly motivated. I figured that this was because they were based on Freyd categories, which are abstract things which obey silly, technical laws.

I'm happy to report that I was wrong. We hereby motivate some of the arrow laws.

Free as in theorems

| | Comments (0) | TrackBacks (0)

The programming language Haskell (under reasonable conditions) has this cool property, known as parametricity. Intuitively, it means that all functions of a certain type share certain properties.

After Phil Wadler, we refer to any such property as a "free theorem". In the ramblings that follow, I muse on exactly what they mean.

About this Archive

This page is a archive of recent entries in the category theory category.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.1