 | hets -- a heterogenous Specification (CASL) tool set | Contents | Index |
|
Common.AS_Annotation | Portability | portable | Stability | provisional | Maintainer | hets@tzi.de |
|
|
|
|
|
Description |
These datastructures describe the Annotations of (Het)CASL.
There is also a paramterized data type for an Annoted item.
|
|
Synopsis |
|
|
|
Documentation |
|
data Annote_word |
start of an annote with its WORD or a comment | Constructors | Annote_word String | | Comment_start | |
| Instances | |
|
|
data Annote_text |
|
|
data Display_format |
formats to be displayed (may be extended in the future).
Drop 3 from the show result to get the string for parsing and printing | Constructors | | Instances | |
|
|
swap :: (a, b) -> (b, a) |
swap a pair |
|
swapTable :: [(a, b)] -> [(b, a)] |
swap the entries of a lookup table |
|
toTable :: Show a => [a] -> [(a, String)] |
drop the first 3 characters from the show result |
|
display_format_table :: [(Display_format, String)] |
a lookup table for the textual representation of display formats |
|
lookupDisplayFormat :: Display_format -> String |
lookup the textual representation of a display format
in display_format_table |
|
data PrecRel |
precedence Lower means less and BothDirections means less and greater.
Higher means greater but this is syntactically not allowed in Prec_anno.
NoDirection can also not be specified explicitly,
but covers those ids that are not mentionend in precedences. | Constructors | Higher | | Lower | | BothDirections | | NoDirection | |
| Instances | |
|
|
data AssocEither |
either left or right associative | Constructors | | Instances | |
|
|
data Semantic_anno |
semantic (line) annotations without further information.
Use the same drop-3-trick as for the Display_format. | Constructors | SA_cons | | SA_def | | SA_implies | | SA_mono | | SA_implied | |
| Instances | |
|
|
semantic_anno_table :: [(Semantic_anno, String)] |
a lookup table for the textual representation of semantic annos |
|
lookupSemanticAnno :: Semantic_anno -> String |
lookup the textual representation of a semantic anno
in semantic_anno_table |
|
data Annotation |
all possible annotations (without comment-outs) | Constructors | | Instances | |
|
|
isLabel :: Annotation -> Bool |
isLabel tests if the given Annotation is a label
(a Label typically follows a formula) |
|
isImplied :: Annotation -> Bool |
|
isSemanticAnno :: Annotation -> Bool |
isSemanticAnno tests if the given Annotation is a semantic one |
|
isComment :: Annotation -> Bool |
isComment tests if the given Annotation is a comment line or a
comment group |
|
isAnnote :: Annotation -> Bool |
isAnnote is the invers function to isComment |
|
data Annoted a |
an item wrapped in preceeding (left l_annos)
and following (right r_annos) annotations.
opt_pos should carry the position of an optional semicolon
following a formula (but is currently unused). | Constructors | | Instances | |
|
|
mapAnM :: Monad m => (a -> m b) -> [Annoted a] -> m [Annoted b] |
process all items and wrap matching annotations around the results |
|
replaceAnnoted :: b -> Annoted a -> Annoted b |
replace the item |
|
appendAnno :: Annoted a -> [Annotation] -> Annoted a |
add further following annotations |
|
addLeftAnno :: [Annotation] -> a -> Annoted a |
put together preceding annotations and an item |
|
getRLabel :: Annoted a -> String |
get the label following (or to the right of) an item |
|
Produced by Haddock version 0.6 |