constrained-categories-0.3.1.0: Constrained clones of the category-theory type classes, using ConstraintKinds.

Copyright(c) 2013 Justus Sagemüller
LicenseGPL v3 (see COPYING)
Maintainer(@) sagemueller $ geo.uni-koeln.de
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Category.Hask

Description

Re-exports of all the common category-theory inspired classes from the "base" package, i.e. basically endofunctors in the Hask category (with functions (->) as morphisms). The module is thus intended to be imported qualified as Hask.

Main use case would be defining new such functors / monads etc. yourself; even if you only intend to use them through the more general category-agnostic interface established in this package then the instances should still be defined for the plain old Hask-specific classes, i.e. for some

data F a = ...
fmapF :: (a->b) -> F a->F b@

instance Hask.Functor F where
  Hask.fmap = fmapF

An instance of Functor arises automatically from this, as defined generically for all (->) functors in that module.

Documentation

module Prelude