Copyright | (c) 2017 Dominic Orchard Andrew Rice Mistral Contrastin Matthew Danish |
---|---|
License | Apache-2.0 |
Maintainer | dom.orchard@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Defines the UnitAnnotation
datatype, which is used for annotating a
ProgramFile
with units information.
Synopsis
- type UA = Analysis (UnitAnnotation A)
- mkUnitAnnotation :: a -> UnitAnnotation a
- prevAnnotation :: UnitAnnotation a -> a
- unitBlock :: UnitAnnotation a -> Maybe (Block (Analysis (UnitAnnotation a)))
- unitConstraint :: UnitAnnotation a -> Maybe Constraint
- unitInfo :: UnitAnnotation a -> Maybe UnitInfo
- unitPU :: UnitAnnotation a -> Maybe (ProgramUnit (Analysis (UnitAnnotation a)))
- unitSpec :: UnitAnnotation a -> Maybe UnitStatement
- cleanLinks :: ProgramFile UA -> ProgramFile UA
- getConstraint :: Annotated f => f UA -> Maybe Constraint
- getUnitInfo :: Annotated f => f UA -> Maybe UnitInfo
- maybeSetUnitConstraintF2 :: Annotated f => (a -> b -> Constraint) -> Maybe a -> Maybe b -> f UA -> f UA
- maybeSetUnitInfo :: Annotated f => Maybe UnitInfo -> f UA -> f UA
- maybeSetUnitInfoF2 :: Annotated f => (a -> b -> UnitInfo) -> Maybe a -> Maybe b -> f UA -> f UA
- setConstraint :: Annotated f => Constraint -> f UA -> f UA
- setUnitInfo :: Annotated f => UnitInfo -> f UA -> f UA
Annotation Type
mkUnitAnnotation :: a -> UnitAnnotation a Source #
prevAnnotation :: UnitAnnotation a -> a Source #
unitBlock :: UnitAnnotation a -> Maybe (Block (Analysis (UnitAnnotation a))) Source #
linked variable declaration
unitConstraint :: UnitAnnotation a -> Maybe Constraint Source #
unitPU :: UnitAnnotation a -> Maybe (ProgramUnit (Analysis (UnitAnnotation a))) Source #
linked program unit
unitSpec :: UnitAnnotation a -> Maybe UnitStatement Source #
Helpers
cleanLinks :: ProgramFile UA -> ProgramFile UA Source #
getConstraint :: Annotated f => f UA -> Maybe Constraint Source #
Extract the constraint from a given annotated piece of AST.
getUnitInfo :: Annotated f => f UA -> Maybe UnitInfo Source #
Extract the unit info from a given annotated piece of AST.
maybeSetUnitConstraintF2 :: Annotated f => (a -> b -> Constraint) -> Maybe a -> Maybe b -> f UA -> f UA Source #
maybeSetUnitInfoF2 :: Annotated f => (a -> b -> UnitInfo) -> Maybe a -> Maybe b -> f UA -> f UA Source #
setConstraint :: Annotated f => Constraint -> f UA -> f UA Source #
Set the Constraint field on a piece of AST.