|
definition: |
curryModulesInDirectory :: String -> IO [String]
curryModulesInDirectory dir = getModules "" dir
where
getModules p d = do
exdir <- doesDirectoryExist d
entries <- if exdir then getDirectoryContents d else return []
let realentries = filter (\f -> length f >= 1 && head f /= '.') entries
newprogs = filter isCurryFile realentries
subdirs <- mapM (\e -> do b <- doesDirectoryExist (d </> e)
return $ if b then [e] else [])
realentries
>>= return . concat
subdirentries <- mapM (\s -> getModules (p ++ s ++ ".") (d </> s)) subdirs
return $ map ((p ++) . stripCurrySuffix) newprogs ++ concat subdirentries
isCurryFile f = takeExtension f `elem` [".curry",".lcurry"]
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
--------------------------------------------------------------------------- Gets the names of all Curry modules contained in a given directory. Modules in subdirectories are returned as hierarchical module names. |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> _}
|
|
name: |
curryModulesInDirectory |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
String -> Prelude.IO [String] |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |