downhill-0.4.0.0: Reverse mode automatic differentiation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Downhill.Internal.Graph.OpenMap

Synopsis

OpenMap

data OpenMap (f :: Type -> Type) Source #

Heterogeneous map with StableName as a key.

data OpenKey x Source #

A key of OpenMap.

data SomeOpenItem f Source #

Key and value.

Constructors

forall x. SomeOpenItem (OpenKey x) (f x) 

Construction

makeOpenKey :: f v -> IO (OpenKey v) Source #

insert :: forall f dx. OpenKey dx -> f dx -> OpenMap f -> OpenMap f Source #

Query

lookup :: OpenMap f -> OpenKey x -> Maybe (f x) Source #

elems :: OpenMap (Const b) -> [b] Source #

Modify

map :: forall f g. (forall x. f x -> g x) -> OpenMap f -> OpenMap g Source #

mapWithKey :: forall f g. (forall d. OpenKey d -> f d -> g d) -> OpenMap f -> OpenMap g Source #

mapMaybe :: forall f g. (forall x. f x -> Maybe (g x)) -> OpenMap f -> OpenMap g Source #

adjust :: forall f x. (f x -> f x) -> OpenKey x -> OpenMap f -> OpenMap f Source #

intersectionWith :: forall f g h. (forall x. f x -> g x -> h x) -> OpenMap f -> OpenMap g -> OpenMap h Source #