camfort-0.904: CamFort - Cambridge Fortran infrastructure

Safe HaskellNone
LanguageHaskell2010

Camfort.Helpers.Syntax

Contents

Description

This module provides a number of helper functions for working with Fortran syntax that are useful between different analyses and transformations.

Synopsis

Variable renaming helpers

caml :: [Char] -> [Char] Source #

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

Constructors

AnnotationFree 

Fields

af :: t -> AnnotationFree t Source #

short-hand constructor 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

SrcSpan Helpers

Orphan instances

Monoid Int Source #

Set a default monoid instances for Int

Methods

mempty :: Int #

mappend :: Int -> Int -> Int #

mconcat :: [Int] -> Int #