buildwrapper 0.8.5 → 0.8.6
raw patch · 2 files changed
+10/−3 lines, 2 files
Files
buildwrapper.cabal view
@@ -1,5 +1,5 @@ name: buildwrapper-version: 0.8.5+version: 0.8.6 cabal-version: >= 1.8 build-type: Simple license: BSD3
src/Language/Haskell/BuildWrapper/GHC.hs view
@@ -307,11 +307,18 @@ | otherwise=return () bwSeverity :: DynFlags -> Severity -> Maybe BWNoteStatus- bwSeverity df SevWarning = Just (if dopt Opt_WarnIsError df then BWError else BWWarning) + bwSeverity df SevWarning = Just (if isWarnIsError df then BWError else BWWarning) bwSeverity _ SevError = Just BWError bwSeverity _ SevFatal = Just BWError bwSeverity _ _ = Nothing +-- | do we have -Werror +isWarnIsError :: DynFlags -> Bool+#if __GLASGOW_HASKELL__ >= 707+isWarnIsError df = gopt Opt_WarnIsError df+#else+isWarnIsError df = dopt Opt_WarnIsError df+#endif -- | Convert 'GHC.Messages' to '[BWNote]'. --@@ -1004,7 +1011,7 @@ -- | convert a GHC warning message to our note type ghcWarnMsgToNote :: DynFlags -> FilePath -> WarnMsg -> BWNote-ghcWarnMsgToNote df= ghcMsgToNote df (if dopt Opt_WarnIsError df then BWError else BWWarning)+ghcWarnMsgToNote df= ghcMsgToNote df (if isWarnIsError df then BWError else BWWarning) -- | convert a GHC message to our note type -- Note that we do *not* include the extra info, since that information is