Remove dependency on Safe from Setup.hs

This commit is contained in:
Daniel Gröber 2016-01-19 20:57:05 +01:00
parent bb5ac3899a
commit bd021e42b3

View File

@ -8,7 +8,6 @@ import Distribution.Simple.InstallDirs as ID
import Distribution.Simple.LocalBuildInfo import Distribution.Simple.LocalBuildInfo
import Distribution.PackageDescription import Distribution.PackageDescription
import Safe
import Control.Arrow import Control.Arrow
import Control.Applicative import Control.Applicative
import Control.Monad import Control.Monad
@ -142,6 +141,10 @@ parseVer str =
[(ver, _)] -> ver [(ver, _)] -> ver
_ -> error $ "No parse (Ver) :(\n" ++ str ++ "\n" _ -> error $ "No parse (Ver) :(\n" ++ str ++ "\n"
fromJustNote :: String -> Maybe a -> a
fromJustNote _ (Just x) = x
fromJustNote note Nothing = error $ "fromJustNote ("++note++"): "
-- sanityCheckCabalVersions args cf desc lbi = do -- sanityCheckCabalVersions args cf desc lbi = do
-- (cabalInstallVer, cabalVer) <- getCabalExecVer -- (cabalInstallVer, cabalVer) <- getCabalExecVer