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

Safe HaskellSafe-Infered

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 -> AnnotationSource

Add an annotation to a collection.

empty :: AnnotationSource

An empty collection.

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

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

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

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 -> AnnotationSource

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 aSource

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