Copyright | (c) OleksandrZhabenko 2019-2020 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Safe Haskell | None |
Language | Haskell2010 |
A small library to deal with executable endings. Uses a Maybe data representation inside an IO monad.
Documentation
showE :: String -> Maybe String Source #
Gets the proper name of the executable in the system (it must be seen in the directories in the PATH
variable).
You can use showE
"nameOfExecutable" to get Just
"nameOfExecutable"@ if it is present on the system. Further you can adopt it to be used
inside the callCommand
as the name of the executable
findSysExes :: [String] -> Maybe String Source #
Being given a list of names of executables (without an ".exe" suffix) looks up for them in the specified list order
till the first existing occurrence. If there is no such occurrence (the specified executables are not installed in the directories
mentioned in the variable PATH
) then the function returns Nothing
.