supermonad: Plugin and base library to support supermonads in Haskell

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

The supermonad library adds support for supermonads to GHC using a type checker plugin. Plugins are available from GHC 7.10 onwards. The base library containing the Haskell representation of super monads is also given by this package. Supermonads provide a unified representation of several monadic generalizations to remove the need for manual disambiguation between these notions and allow sharing of common functions between them. Additional information can be found in the README.


[Skip to Readme]

Properties

Versions 0.1, 0.2.0, 0.2.0.1, 0.2.1.1, 0.2.1.1
Change log changelog.md
Dependencies base (>=4.8 && <5), containers (>=0.5 && <0.6), fgl (>=5.5 && <6.0), ghc (>=7.10.1 && <8.5), mtl (>=2.2 && <3), transformers (>=0.4 && <0.6) [details]
License BSD-3-Clause
Copyright Copyright (c) 2016-2018, Jan Bracker
Author Jan Bracker <jan.bracker@googlemail.com>
Maintainer Jan Bracker <jan.bracker@googlemail.com>
Category Type System, Plugin, Monad
Bug tracker https://github.com/jbracker/supermonad/issues
Source repo head: git clone https://github.com/jbracker/supermonad.git
Uploaded by JanBracker at 2018-05-07T11:38:04Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for supermonad-0.2.1.1

[back to package description]

Supermonads and superapplicatives for GHC

Implementation of supermonads for GHC. See the Supermonads: One Notion to Bind Them All paper for detailed explanation of version 0.1. An updated version of the paper that also explains superapplicatives has been submitted to JFP.

Supermonads

The library offers two definitions for supermonads. The version in Control.Super.Monad does not have support for constrained monads. The version in Control.Super.Monad.Constrained has support for constrained monads. The different versions are provided, because working with the additional constraints required for constrained monads can be cumbersome sometimes. We want to offer people a possibility to experiment with supermonads without having to bother with these constraints, if they don't need constrained monads. If you have any feedback or suggestions for improvement from you usage of supermonads, please leave them on the GitHub bug tracker or write an email to the maintainer. These parallel structures will not be maintained indefinitely and at some point we will probably only offer supermonads with support for constrained monads.

Superapplicatives

Support for generalized applicatives was added in version 0.2. For users this does not change anything.

Build Status

master dev
build status master build status dev

GHC Version

The implementation has been tested with GHC in version 7.10.3, 8.0.2 and 8.2.1.

Versions of GHC prior to version 7.10.1 will most certainly not work, because the plugin mechanism was still in development.

Newer version of GHC may work. If you encounter problems with a newer version of GHC, please file a bug report so it can be fixed.

Usage

To use supermonads in a module you need to do the following:

Bug Reports

If you file a bug report, please always include the version of GHC you are working with and a minimal example that shows the problem.

Examples

Examples for the use of the plugin with different kinds of monad generalizations are provided in the examples directory. All examples have their own separate cabal file and offer a version of the code with and without the use of supermonads.

A minimal example of how to use supermonads can be found under examples/monad/minimal. It is a good entry point to play around with supermonads.