UMinho Haskell Libraries (1.0)ContentsIndex
Language.Haskell.ChaseImports
Portability portable
Stability experimental
Maintainer joost.visser@di.uminho.pt
Contents
Import chasing for Haskell
Handle literate scripts
Haskell I-O Auxilliaries
General I-O Auxilliaries
Description
This module implements import chasing for Haskell.
Synopsis
hsIOwrapChasingArgs :: (FilePath, ModuleName, FilePath) -> (ModuleCollection -> IO ModuleCollection) -> IO ()
hsChaseFrom :: [FilePath] -> ModuleName -> IO ModuleCollection
hsChaseWith :: [FilePath] -> [ModuleName] -> [ModuleName] -> a -> (ModuleEntry -> a -> IO a) -> (ModuleName -> a -> IO a) -> IO a
hsChaseDownDirs :: [FilePath] -> [FilePath] -> IO ModuleCollection
fromLiterate :: String -> String
isLit :: String -> Bool
fromLit :: Bool -> String -> String
toLit :: Bool -> String -> String
isLiterate :: String -> Bool
parseWrap' :: String -> Either HsModule String
findHsFiles :: [FilePath] -> IO [FilePath]
readHsFile :: [FilePath] -> ModuleName -> IO String
writeModule :: FilePath -> ModuleEntry -> IO ()
m2fname :: ModuleName -> FilePath
fname2m :: FilePath -> ModuleName
errLn :: String -> IO ()
noBasename :: FilePath -> FilePath
noExtension :: FilePath -> FilePath
readFileSearching :: [FilePath] -> FilePath -> [String] -> IO String
createDirectoryForced :: FilePath -> FilePath -> IO ()
breakFile :: FilePath -> [String]
breakPath :: String -> [FilePath]
breakWith :: (a -> Bool) -> [a] -> [[a]]
testOnUMinhoHaskellLibrariesWithContrib :: IO ModuleCollection
Import chasing for Haskell
hsIOwrapChasingArgs
:: (FilePath, ModuleName, FilePath)Path, module name, output directory
-> (ModuleCollection -> IO ModuleCollection)Transformation function
-> IO ()
Chase modules, given a searchpath and module name, apply a transformation function, and write the resulting modules to a given output directory.
hsChaseFrom :: [FilePath] -> ModuleName -> IO ModuleCollection
Start chasing from a single module (wrapper).
hsChaseWith
:: [FilePath]Directories to search
-> [ModuleName]Modules still to find (todo)
-> [ModuleName]Modules already found (done)
-> aAccumulator
-> (ModuleEntry -> a -> IO a)Action taken on modules found.
-> (ModuleName -> a -> IO a)Action taken on missing modules.
-> IO a
Haskell import chase algorithm (worker).
hsChaseDownDirs
:: [FilePath]Search path for import chasing
-> [FilePath]Directories to find top modules
-> IO ModuleCollection
Start chasing from all haskell modules that can be found recursively inside the given top directories.
Handle literate scripts
fromLiterate :: String -> String
isLit :: String -> Bool
fromLit :: Bool -> String -> String
toLit :: Bool -> String -> String
isLiterate :: String -> Bool
Haskell I-O Auxilliaries
parseWrap' :: String -> Either HsModule String
Parse a String as a Haskell module. Returns either the parsed module or an error message.
findHsFiles :: [FilePath] -> IO [FilePath]
Find haskell files inside a list of directories
readHsFile :: [FilePath] -> ModuleName -> IO String
Read a Haskell file with given name from given path.
writeModule
:: FilePathOutput directory.
-> ModuleEntryModule to be written.
-> IO ()
Write a given module to file, in the given directory.
m2fname :: ModuleName -> FilePath
Transform a Haskel module name (containing dots) into a file name (containing slashes).
fname2m :: FilePath -> ModuleName
Transform a file name (containing slashes) into a Haskel module name (containing dots).
General I-O Auxilliaries
errLn :: String -> IO ()
Report an error on stderr.
noBasename :: FilePath -> FilePath
Obtain the directory part of a file name.
noExtension :: FilePath -> FilePath
Obtain the file name without extension.
readFileSearching :: [FilePath] -> FilePath -> [String] -> IO String
Search for a file in given directories with alternative extensions
createDirectoryForced
:: FilePathDirectory in which to create the new directories
-> FilePathDirectory to create (may contain slashes).
-> IO ()
Create a directory, and its parents if necessary.
breakFile :: FilePath -> [String]
break a file name into its segments, i.e. the pieces between slashes.
breakPath :: String -> [FilePath]
Break path argument into directory names. i.e. the pieces between colons.
breakWith :: (a -> Bool) -> [a] -> [[a]]
Break a list into segments, using a predicate on elements to indicate break points. The break points themselves will be discarded.
testOnUMinhoHaskellLibrariesWithContrib :: IO ModuleCollection
Produced by Haddock version 0.6