mmsyn3 0.1.2.2 → 0.1.3.0
raw patch · 3 files changed
+12/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ EndOfExe: findSysExes :: [String] -> Maybe String
Files
- ChangeLog.md +4/−0
- EndOfExe.hs +7/−1
- mmsyn3.cabal +1/−1
ChangeLog.md view
@@ -23,3 +23,7 @@ ## 0.1.2.2 -- 2019-11-18 * First version revised E. Fixed another issue with documentation. ++## 0.1.3.0 -- 2019-11-18++* First version revised F. Added a new function findSysExes.
EndOfExe.hs view
@@ -1,7 +1,7 @@ module EndOfExe where import qualified System.Directory as D (findExecutable)-import Data.Maybe (isJust)+import Data.Maybe (isJust,isNothing) import System.IO.Unsafe (unsafePerformIO) -- | Function that is used instead of 'System.Info.os' to check whether the executable ends in .exe. The function returns @IO Nothing@ if there is neither @ys@ nor @(ys ++ ".exe")@ names for executables in the @@ -26,3 +26,9 @@ if isJust r then r else Nothing++-- | Function that being given a list of names of executables (without .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@.+findSysExes :: [String] -> Maybe String+findSysExes xss | null (dropWhile isNothing . map showE $ xss) = Nothing+ | otherwise = head (dropWhile isNothing . map showE $ xss)
mmsyn3.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn3-version: 0.1.2.2+version: 0.1.3.0 synopsis: A small library to deal with executable endings description: A small library to deal with executable endings. Uses a Maybe data representation inside an IO monad. homepage: http://hackage.haskell.org/package/mmsyn3