definition: |
splitValidProgramName :: String -> (FilePath, ModuleIdent) splitValidProgramName s | null mname = error $ "The module name is empty." | not (isValidModuleName mname) = error $ "The program name '" ++ s ++ "' contains an invalid module name." | otherwise = (dir,mname) where (dir,mname) = splitProgramName s |
demand: |
no demanded arguments |
deterministic: |
deterministic operation |
documentation: |
Splits a program name, i.e., a module name possibly prefixed by a directory, into the directory and a *valid* module name. A possible suffix like `.curry` or `.lcurry` is dropped from the module name. For instance `splitValidProgramName "lib/Data.Set.curry"` evaluates to `("lib","Data.Set")`. An error is raised if the program name is empty or the module name is not valid. |
failfree: |
_ |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_) |-> _} |
name: |
splitValidProgramName |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
String -> (String, String) |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |