Copyright | (c) William Yager 2015 |
---|---|
License | BSD |
Maintainer | will (dot) yager (at) gmail (dot) com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provides functions for generic indexing of Monadic data structures.
- class MKeyed d where
- type MKey d
- type MValue d
- type MContainer d :: * -> *
- indexM :: d -> MKey d -> MContainer d (MValue d)
- lookupM :: d -> MKey d -> MContainer d (Maybe (MValue d))
- (!!) :: MKeyed d => d -> MKey d -> MContainer d (MValue d)
- (!!?) :: MKeyed d => d -> MKey d -> MContainer d (Maybe (MValue d))
Documentation
Data structures that allow monadic lookup of values.
The key to look up by.
The value that is returned.
type MContainer d :: * -> * Source
The container it is returned in.