| Copyright | (c) Klaus Luettich, Christian Maeder and Uni Bremen 2002-2006 |
|---|---|
| License | GPLv2 or higher, see LICENSE.txt |
| Maintainer | Christian.Maeder@dfki.de |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
Common.GlobalAnnotations
Description
Data structures for global annotations
- data GlobalAnnos = GA {}
- emptyGlobalAnnos :: GlobalAnnos
- data LiteralAnnos = LA {}
- emptyLiteralAnnos :: LiteralAnnos
- type DisplayMap = Map Id (Map Display_format [Token])
- type LiteralMap = Map Id LiteralType
- type PrefixMap = Map String IRI
- data LiteralType
- getLiteralType :: GlobalAnnos -> Id -> LiteralType
- type AssocMap = Map Id AssocEither
- isAssoc :: AssocEither -> AssocMap -> Id -> Bool
- type PrecedenceGraph = Rel Id
- precRel :: PrecedenceGraph -> Id -> Id -> PrecRel
- lookupDisplay :: GlobalAnnos -> Display_format -> Id -> Maybe [Token]
Documentation
data GlobalAnnos
all global annotations and a field for pretty printing stuff
Constructors
| GA | |
Fields
| |
emptyGlobalAnnos :: GlobalAnnos
empty (or initial) global annotations
emptyLiteralAnnos :: LiteralAnnos
empty literal annotations
type DisplayMap = Map Id (Map Display_format [Token])
ids to be displayed according to a format
type LiteralMap = Map Id LiteralType
a redundant map for LiteralAnnos
data LiteralType
description of the type of a literal for a given Id in LiteralMap
Constructors
| StringCons Id | refer to the |
| StringNull | |
| ListCons Id Id | |
| ListNull Id | brackets (as |
| Number | |
| Fraction | |
| Floating | |
| NoLiteral | and error value for a |
getLiteralType :: GlobalAnnos -> Id -> LiteralType
the LiteralType of an Id (possibly NoLiteral)
type AssocMap = Map Id AssocEither
a map of associative ids
type PrecedenceGraph = Rel Id
a binary relation over ids as precedence graph
Arguments
| :: PrecedenceGraph | Graph describing the precedences |
| -> Id | x oID (y iid z) -- outer id |
| -> Id | x oid (y iID z) -- inner id |
| -> PrecRel |
return precedence relation of two ids
lookupDisplay :: GlobalAnnos -> Display_format -> Id -> Maybe [Token]
lookup of an display [string] in the GlobalAnnos record