graphted-0.3.1.0: Graph indexed monads.

Copyright(c) Aaron Friel
LicenseBSD-3
MaintainerAaron Friel <mayreply@aaronfriel.com>
Stabilityunstable
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Control.MonadPlus.Graph

Description

 

Synopsis

Documentation

class GMonadZero m => GMonadPlus m where Source #

Graph indexed monad with a monoidal operation satisfying the left distribution law.

See the typeclassopedia https://wiki.haskell.org/Typeclassopedia.

Minimal complete definition

gplus

Associated Types

type Plus m (i :: p) (j :: p) :: p Source #

The or operation (mplus) on the graph index.

Default instance: Plus m i j = Combine m i j

type PlusInv m (i :: p) (j :: p) :: Constraint Source #

An invariant on the indexes of Plus.

Default instance: PlusInv m i j = Inv m i j

Methods

gplus :: PlusInv m i j => m i a -> m j a -> m (Plus m i j) a Source #

An associative binary operation (mplus).

Instances

MonadPlus m => GMonadPlus * (GWrapped m) Source # 

Associated Types

type Plus (GWrapped m) (m :: GWrapped m -> * -> *) (i :: GWrapped m) (j :: GWrapped m) :: p Source #

type PlusInv (GWrapped m) (m :: GWrapped m -> * -> *) (i :: GWrapped m) (j :: GWrapped m) :: Constraint Source #

Methods

gplus :: PlusInv (GWrapped m) m i j => m i a -> m j a -> m (Plus (GWrapped m) m i j) a Source #

IxMonadPlus * m => GMonadPlus (*, *) (WrappedIx m) Source # 

Associated Types

type Plus (WrappedIx m) (m :: WrappedIx m -> * -> *) (i :: WrappedIx m) (j :: WrappedIx m) :: p Source #

type PlusInv (WrappedIx m) (m :: WrappedIx m -> * -> *) (i :: WrappedIx m) (j :: WrappedIx m) :: Constraint Source #

Methods

gplus :: PlusInv (WrappedIx m) m i j => m i a -> m j a -> m (Plus (WrappedIx m) m i j) a Source #