camfort-0.802: CamFort - Cambridge Fortran infrastructure

Safe HaskellNone
LanguageHaskell98

Camfort.Input

Contents

Synopsis

Documentation

class Default t where Source #

Minimal complete definition

defaultValue

Methods

defaultValue :: t Source #

getOption :: forall t opt. (Data opt, Data t, Default opt) => [t] -> opt Source #

Builders for analysers and refactorings

doAnalysis :: (Program A -> Program Annotation) -> FileOrDir -> [Filename] -> IO () Source #

Performs an analysis provided by its first parameter on the directory of its second, excluding files listed by its third

doAnalysisSummary :: (Monoid s, Show s) => (Program A -> s) -> FileOrDir -> [Filename] -> IO () Source #

Performs an analysis provided by its first parameter which generates information s, which is then combined together (via a monoid)

doAnalysisReport :: ([(Filename, Program A)] -> (String, t1)) -> FileOrDir -> [Filename] -> t -> IO () Source #

Performs an analysis which reports to the user, but does not output any files

doAnalysisReport' :: ([(Filename, Program A)] -> (String, t1)) -> FileOrDir -> [Filename] -> t -> IO () Source #

doRefactor :: ([(Filename, Program A)] -> (String, [(Filename, Program Annotation)])) -> FileOrDir -> [Filename] -> FileOrDir -> IO () Source #

Performs a refactoring provided by its first parameter, on the directory of the second, excluding files listed by third, output to the directory specified by the fourth parameter

Source directory and file handling

readParseSrcDir :: FileOrDir -> [Filename] -> IO [(Filename, String, Program A)] Source #

Read files from a direcotry, excluding those listed by the second parameter

isFortran :: [Char] -> Bool Source #

predicate on which fileextensions are Fortran files

readParseSrcFile :: Filename -> IO (Filename, String, Program A) Source #

Read a specific file, and parse it

parse :: Filename -> IO (Program ()) Source #

parse file into an un-annotated Fortran AST

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

extract a filename's extension