Copyright | (c) Aaron Friel |
---|---|
License | BSD-3 |
Maintainer | Aaron Friel <[email protected]> |
Stability | unstable | experimental | provisional | stable | frozen |
Portability | portable | non-portable (<reason>) |
Safe Haskell | Safe |
Language | Haskell2010 |
Data.Functor.Graph
Description
- class GFunctor f where
- type Fmap f (i :: p) :: p
- type Replace f (i :: p) :: p
- type EfficientReplace f :: Bool
- class GFunctorReplace f
Documentation
class GFunctor f where Source #
Graph indexed functor.
Minimal complete definition
Associated Types
type Fmap f (i :: p) :: p Source #
The fmap operation (fmap
) on the graph index.
Default instance: Fmap f i = i
type Replace f (i :: p) :: p Source #
type EfficientReplace f :: Bool Source #
Methods
gmap :: (a -> b) -> f i a -> f (Fmap f i) b Source #
Map a function over over the functor (fmap
).
greplace :: a -> f i b -> f (Replace f i) a Source #
Replace all values with a constant (<$
).
Default implementation requires the default instance of Replace
.
greplace :: Replace f i ~ Fmap f i => a -> f i b -> f (Replace f i) a Source #
class GFunctorReplace f Source #