camfort-1.1.0: CamFort - Cambridge Fortran infrastructure
Copyright(c) 2017 Dominic Orchard Andrew Rice Mistral Contrastin Matthew Danish
LicenseApache-2.0
Maintainerdom.orchard@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Camfort.Specification.Units.Annotation

Description

Defines the UnitAnnotation datatype, which is used for annotating a ProgramFile with units information.

Synopsis

Annotation Type

type UA = Analysis (UnitAnnotation A) Source #

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 #

unitInfo :: UnitAnnotation a -> Maybe UnitInfo 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 #

maybeSetUnitInfo :: Annotated f => Maybe UnitInfo -> 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.

setUnitInfo :: Annotated f => UnitInfo -> f UA -> f UA Source #

Set the UnitInfo field on a piece of AST.