free-category: efficient data types for free categories and arrows

[ algebra, category, category-theory, control, library, monads, mpl ] [ Propose Tags ]

This package provides various data types for free categories, type aligned queues, arrows and type classes which allow to write abstract categories with side effects (Kleisli like categories). These are useful for encoding type safe state machines. Free arrows are also provided.

[Skip to Readme]
Versions [faq],,,,,, (info)
Change log
Dependencies base (>=4.9 && <5), free-algebras (>= [details]
License MPL-2.0
Copyright (c) 2018-2021 Marcin Szamotulski
Author Marcin Szamotulski
Category Algebra, Control, Monads, Category
Home page
Bug tracker
Source repo head: git clone
Uploaded by coot at 2021-03-28T09:58:16Z
Distributions NixOS:
Downloads 1741 total (96 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-03-28 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for free-category-

[back to package description]

Free Category

Maintainer: coot Haskell/CI

This package contains efficient implementations of free categories. There are various representations available:

  • real-time queues (C. Okasaki 'Pure Functional Data Structures')
  • type aligned lists
  • continuation passing style (Church encoding)

Free arrows and free Kleisli categories are also included.

Free categories are useful to model state machines in a simple yet type safe manner. For that purpose Kleisli categories are a very useful target which allows to include monadic computations. This package contains a useful generalisation of Kleisli categories captured by EffectCategory class (categories with effects), and a (free) transformer which lifts a category to a category with effects.


Check performance characteristics of various representations: