This bachelor thesis explains monads and their applications in the programming language Haskell. Apart from clarifying the common description of monads as monoids in the category of endofunctors, the deep connection between monads and adjunctions is highlighted, including the Eilenberg-Moore and the Kleisli category.
On the more applied side, we describe the Monad
type class,
which is used to represent monads in Haskell and uses the notion of extension systems (or Kleisli triples).
The List
, Maybe
, and Writer
monads are of fundamental importance in Haskell.
Using our developed theory, we can understand these as the free monoid monad, the monad corresponding the free-forgetful adjunction between \(\Set\) and \(\Set_\ast\)
and a special case of the action monad, respectively.