-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Generic indexing for many data structures
--
@package keyed
@version 0.2.0.0
-- | This module provides functions for generic indexing of Monadic data
-- structures.
module Data.MKeyed
-- | Data structures that allow monadic lookup of values.
class MKeyed d where type family MKey d type family MValue d type family MContainer d :: * -> *
indexM :: MKeyed d => d -> MKey d -> MContainer d (MValue d)
lookupM :: MKeyed d => d -> MKey d -> MContainer d (Maybe (MValue d))
-- | An inline version of indexM.
(!!) :: MKeyed d => d -> MKey d -> MContainer d (MValue d)
-- | An inline version of lookupM.
(!!?) :: MKeyed d => d -> MKey d -> MContainer d (Maybe (MValue d))
instance MKeyed (STVector s a)
-- | This module provides functions for generic indexing of data
-- structures.
module Data.Keyed
-- | Data structures that allow lookup of values.
class Keyed d where type family Key d type family Value d
index :: Keyed d => d -> Key d -> Value d
lookup :: Keyed d => d -> Key d -> Maybe (Value d)
-- | An inline version of index.
(!) :: Keyed d => d -> Key d -> Value d
-- | An inline version of lookup.
(!?) :: Keyed d => d -> Key d -> Maybe (Value d)
instance Unbox a => Keyed (Vector a)
instance Storable a => Keyed (Vector a)
instance Prim a => Keyed (Vector a)
instance Keyed (Vector a)
instance Ord k => Keyed (Map k v)
instance Keyed [a]
instance Keyed (Seq a)