monad-memo-0.5.1: Memoization monad transformer

Copyright(c) Eduard Sergeev 2011
LicenseBSD-style (see the file LICENSE)
Maintainereduard.sergeev@gmail.com
Stabilityexperimental
Portabilitynon-portable (multi-param classes, functional dependencies)
Safe HaskellSafe
LanguageHaskell2010

Data.MapLike.Instances

Contents

Description

Defines MapLike instances declaration for standard data types

Synopsis
  • class MapLike c k v | c -> k, c -> v where

    Documentation

    class MapLike c k v | c -> k, c -> v where Source #

    An abstract interface to the container which can store v indexed by k

    Minimal complete definition

    lookup, add

    Methods

    lookup :: k -> c -> Maybe v Source #

    add :: k -> v -> c -> c Source #

    Instances
    MapLike (IntMap v) Int v Source #

    Data.IntMap is usually more efficient that Data.Map if k :: Int

    Instance details

    Defined in Data.MapLike.Instances

    Methods

    lookup :: Int -> IntMap v -> Maybe v Source #

    add :: Int -> v -> IntMap v -> IntMap v Source #

    Ord k => MapLike (Map k v) k v Source #

    Data.Map is a default implementation (not the fastest but well-known)

    Instance details

    Defined in Data.MapLike.Instances

    Methods

    lookup :: k -> Map k v -> Maybe v Source #

    add :: k -> v -> Map k v -> Map k v Source #

    Orphan instances

    MapLike (IntMap v) Int v Source #

    Data.IntMap is usually more efficient that Data.Map if k :: Int

    Instance details

    Methods

    lookup :: Int -> IntMap v -> Maybe v Source #

    add :: Int -> v -> IntMap v -> IntMap v Source #

    Ord k => MapLike (Map k v) k v Source #

    Data.Map is a default implementation (not the fastest but well-known)

    Instance details

    Methods

    lookup :: k -> Map k v -> Maybe v Source #

    add :: k -> v -> Map k v -> Map k v Source #