Skip to content

Commit

Permalink
patch applied
Browse files Browse the repository at this point in the history
  • Loading branch information
eswar2001 committed Dec 18, 2024
1 parent 950ad9f commit c43b79d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions fdep/src/Fdep/Plugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ import qualified Network.WebSockets as WS
import System.Environment (lookupEnv)
import GHC.IO (unsafePerformIO)
#if __GLASGOW_HASKELL__ >= 900
import GHC.Driver.Errors
import GHC.Driver.Session
import GHC.Data.Bag
import GHC.Types.Error
import GHC.Core.TyCo.Rep
import GHC.Core.TyCon
import GHC.Core.DataCon
Expand All @@ -53,10 +57,10 @@ import GHC.Driver.Env
import GHC.Tc.Types
import GHC.Unit.Module.ModSummary
import GHC.Utils.Outputable (showSDocUnsafe,ppr)
import GHC.Data.Bag (bagToList)
import GHC.Types.Name hiding (varName)
import GHC.Types.Var
import qualified Data.Aeson.KeyMap as HM
import GHC.Unit.Module.ModGuts
#else
import TyCoRep
import DataCon
Expand Down Expand Up @@ -87,9 +91,10 @@ handleWarns _ _ _ x =do
dflags <- getDynFlags
logger <- getLogger
warnings <- getWarnings
liftIO $ print $ map (errMsgReason) $ bagToList warnings
liftIO $ printOrThrowWarnings logger dflags warnings
clearWarnings
x
return x

where
getWarnings :: Hsc WarningMessages
Expand Down Expand Up @@ -1065,4 +1070,4 @@ getLoc' = (showSDocUnsafe . ppr . la2r . getLoc)
#else
getLocTC' = (showSDocUnsafe . ppr . getLoc)
getLoc' = (showSDocUnsafe . ppr . getLoc)
#endif
#endif

0 comments on commit c43b79d

Please sign in to comment.