Paraiso-0.3.1.5: a code generator for partial differential equations solvers.

Safe HaskellSafe
LanguageHaskell2010

Language.Paraiso.Annotation

Description

Annotation is a collection of Typeables with which you can annotate each OM node.

Synopsis

Documentation

add :: Typeable a => a -> Annotation -> Annotation Source

Add an annotation to a collection.

empty :: Annotation Source

An empty collection.

map :: (Typeable a, Typeable b) => (a -> b) -> Annotation -> Annotation Source

Map all annotations of type a to type b, while leaving the others untouched.

set :: Typeable a => a -> Annotation -> Annotation Source

Remove all elements of type a from the collection, and set x as the only member of the type in the collection.

weakSet :: Typeable a => a -> Annotation -> Annotation Source

set x as the only member of the type in the collection, only if no annotation of the same type pre-exists.

toList :: Typeable a => Annotation -> [a] Source

Extract all annotations of type a from the collection.

toMaybe :: Typeable a => Annotation -> Maybe a Source

Extract the first annotation of the given type, if it exists.