diff --git a/CabalApi.hs b/CabalApi.hs index 326b810..494941a 100644 --- a/CabalApi.hs +++ b/CabalApi.hs @@ -25,7 +25,7 @@ cabalParseFile = readPackageDescription silent -- Causes error, catched in the upper function. cabalBuildInfo :: GenericPackageDescription -> IO BuildInfo -cabalBuildInfo pd = do +cabalBuildInfo pd = return . fromJust $ fromLibrary pd <|> fromExecutable pd where fromLibrary c = libBuildInfo . condTreeData <$> condLibrary c diff --git a/Check.hs b/Check.hs index 8f65af7..fab8579 100644 --- a/Check.hs +++ b/Check.hs @@ -26,5 +26,5 @@ check opt fileName = withGHC' fileName $ checkIt `gcatch` handleErrMsg _ <- load LoadAllTargets liftIO readLog options - | expandSplice opt = ["-w:"] ++ ghcOpts opt - | otherwise = ["-Wall"] ++ ghcOpts opt + | expandSplice opt = "-w:" : ghcOpts opt + | otherwise = "-Wall" : ghcOpts opt