graphted-0.1.0.2: Graph indexed monads.

Copyright(c) Aaron Friel
LicenseBSD-3
MaintainerAaron Friel <mayreply@aaronfriel.com>
Stabilityunstable | experimental | provisional | stable | frozen
Portabilityportable | non-portable (<reason>)
Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Graph

Description

Synopsis

Documentation

class GFunctor f where Source #

Graph indexed functor.

Minimal complete definition

gmap

Associated Types

type Fmap f (i :: p) :: p Source #

The fmap operation (fmap) on the graph index.

Default instance: Fmap f i = i

type Fconst f (i :: p) :: p Source #

The fconst operation (<$) on the graph index.

Default instance: Fconst f i = Fmap f i

Methods

gmap :: (a -> b) -> f i a -> f (Fmap f i) b Source #

Map a function over over the functor (fmap).

gconst :: a -> f i b -> f (Fconst f i) a Source #

Replace all values with a constant (<$).

Default implementation requires the default instance of Fconst.

gconst :: Fconst f i ~ Fmap f i => a -> f i b -> f (Fconst f i) a Source #

Replace all values with a constant (<$).

Default implementation requires the default instance of Fconst.

Instances

Functor f => GFunctor * (GWrapped f) Source # 

Associated Types

type Fmap (GWrapped f) (f :: GWrapped f -> * -> *) (i :: GWrapped f) :: p Source #

type Fconst (GWrapped f) (f :: GWrapped f -> * -> *) (i :: GWrapped f) :: p Source #

Methods

gmap :: (a -> b) -> f i a -> f (Fmap (GWrapped f) f i) b Source #

gconst :: a -> f i b -> f (Fconst (GWrapped f) f i) a Source #