definition: |
splitSearchPath :: String -> [FilePath] splitSearchPath = f where f xs = case break isSearchPathSeparator xs of (pre, [] ) -> g pre (pre, _:post) -> g pre ++ f post g [] = ["." | isPosix] g x@(_:_) = [x] |
demand: |
no demanded arguments |
deterministic: |
deterministic operation |
documentation: |
-- | Take a string, split it on the 'searchPathSeparator' character. -- -- Follows the recommendations in -- <http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html> -- -- > Posix: splitSearchPath "File1:File2:File3" == ["File1","File2","File3"] -- > Posix: splitSearchPath "File1::File2:File3" == ["File1",".","File2","File3"] -- > Windows: splitSearchPath "File1;File2;File3" == ["File1","File2","File3"] -- > Windows: splitSearchPath "File1;;File2;File3" == ["File1","File2","File3"] |
failfree: |
() |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{() |-> {splitSearchPath.f.16}} |
name: |
splitSearchPath |
precedence: |
no precedence defined |
result-values: |
{splitSearchPath.f.16} |
signature: |
String -> [String] |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |