unlift: Typeclass for monads that can be unlifted to arbitrary base monads

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]

Typeclass for monads that can be unlifted to arbitrary base monads. See README.md for more details.


[Skip to Readme]

Properties

Versions 0.0.0.0, 0.0.0.0
Change log CHANGELOG.md
Dependencies base (>=4.13.0.0 && <4.16), stm (>=2.5 && <2.6), transformers (>=0.5 && <0.6), transformers-base (>=0.4.5 && <0.5) [details]
License MPL-2.0
Copyright 2021 Kowainik
Author Veronika Romashkina, Dmitrii Kovanikov
Maintainer Kowainik <xrom.xkov@gmail.com>
Category Typeclass, Monad, Unlift, Control
Home page https://github.com/kowainik/unlift
Bug tracker https://github.com/kowainik/unlift/issues
Source repo head: git clone https://github.com/kowainik/unlift.git
Uploaded by vrom911 at 2021-04-21T05:13:05Z

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for unlift-0.0.0.0

[back to package description]

unlift

GitHub CI Hackage MPL-2.0 license

Typeclass for monads that can be unlifted to arbitrary base monads:

class (MonadBase b m) => MonadUnlift b m
  where
    withRunInBase :: ((forall a . m a -> b a) -> b x) -> m x

This typeclass is helpful when writing code that is polymorphic over the base monad, so later you can select a different base monad for each specific use-case.

Common usages include:

  1. Concurrent testing with dejafu.
  2. Working with code over polymorphic PrimMonad.