Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a number of helper functions for working with Fortran syntax that are useful between different analyses and transformations.
- data AnnotationFree t = AnnotationFree {
- annotationBound :: t
- af :: t -> AnnotationFree t
- unaf :: AnnotationFree t -> t
- caml :: [Char] -> [Char]
- lower :: [Char] -> [Char]
- extractVariable :: Expression a -> Maybe Name
- dropLine :: SrcSpan -> SrcSpan
- deleteLine :: SrcSpan -> SrcSpan
- linesCovered :: Position -> Position -> Int
- toCol0 :: Position -> Position
- afterAligned :: SrcSpan -> Position
Comparison and ordering
data AnnotationFree t Source #
AnnotationFree
is a data type that wraps other types and denotes terms
which should be compared for equality modulo their annotations and source
location information
Eq (AnnotationFree a) => Eq (AnnotationFree [a]) Source # | |
(Eq (AnnotationFree a), Eq (AnnotationFree b)) => Eq (AnnotationFree (a, b)) Source # | |
Eq (AnnotationFree BaseType) Source # | |
Eq a => Eq (AnnotationFree (Expression a)) Source # | |
Show t => Show (AnnotationFree t) Source # | |
af :: t -> AnnotationFree t Source #
short-hand constructor for AnnotationFree
unaf :: AnnotationFree t -> t Source #
short-hand deconstructor for AnnotationFree
Accessor functions for extracting various pieces of information
extractVariable :: Expression a -> Maybe Name Source #
Extracts a string of the (root) variable name from an expression, e.g., extractVariable "v" = Just v extractVariable "v(i)" = Just v
deleteLine :: SrcSpan -> SrcSpan Source #
afterAligned :: SrcSpan -> Position Source #