cook -> toTupple.
This commit is contained in:
parent
aa0b1d709c
commit
e14dff7508
@ -69,11 +69,11 @@ cabalDir dir = do
|
|||||||
isCabal name = ".cabal" `isSuffixOf` name && length name > 6
|
isCabal name = ".cabal" `isSuffixOf` name && length name > 6
|
||||||
|
|
||||||
ghcVersion :: IO (String, Int)
|
ghcVersion :: IO (String, Int)
|
||||||
ghcVersion = ghcVer >>= cook
|
ghcVersion = ghcVer >>= toTupple
|
||||||
where
|
where
|
||||||
ghcVer = programFindVersion ghcProgram silent (programName ghcProgram)
|
ghcVer = programFindVersion ghcProgram silent (programName ghcProgram)
|
||||||
cook Nothing = throwIO $ userError $ "ghc not found"
|
toTupple Nothing = throwIO $ userError $ "ghc not found"
|
||||||
cook (Just v)
|
toTupple (Just v)
|
||||||
| length vs < 2 = return (verstr, 0)
|
| length vs < 2 = return (verstr, 0)
|
||||||
| otherwise = return (verstr, ver)
|
| otherwise = return (verstr, ver)
|
||||||
where
|
where
|
||||||
|
Loading…
Reference in New Issue
Block a user