From d85c5d682b86fa77790f7791891fc33cd45a50e6 Mon Sep 17 00:00:00 2001 From: Ben Orchard Date: Sun, 15 Sep 2024 17:35:47 +0100 Subject: [PATCH] tweak imports for GHC 9.6 --- src/Language/Fortran/Analysis/BBlocks.hs | 1 + src/Language/Fortran/Analysis/DataFlow.hs | 1 + src/Language/Fortran/Analysis/ModGraph.hs | 2 +- src/Language/Fortran/Analysis/Renaming.hs | 1 + src/Language/Fortran/Analysis/Types.hs | 1 + src/Language/Fortran/Parser.hs | 1 - src/Language/Fortran/Util/ModFile.hs | 1 + test/Language/Fortran/Parser/Free/Fortran95Spec.hs | 2 +- 8 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Language/Fortran/Analysis/BBlocks.hs b/src/Language/Fortran/Analysis/BBlocks.hs index 208e66d4..3eb7c495 100644 --- a/src/Language/Fortran/Analysis/BBlocks.hs +++ b/src/Language/Fortran/Analysis/BBlocks.hs @@ -13,6 +13,7 @@ import Data.List (unfoldr, foldl') import Control.Monad import Control.Monad.State.Lazy hiding (fix) import Control.Monad.Writer hiding (fix) +import Control.Monad ( forM_ ) -- required for mtl-2.3 (GHC 9.6) import Text.PrettyPrint.GenericPretty (pretty, Out) import Text.PrettyPrint (render) import Language.Fortran.Analysis diff --git a/src/Language/Fortran/Analysis/DataFlow.hs b/src/Language/Fortran/Analysis/DataFlow.hs index 19fa58d4..25b654d7 100644 --- a/src/Language/Fortran/Analysis/DataFlow.hs +++ b/src/Language/Fortran/Analysis/DataFlow.hs @@ -42,6 +42,7 @@ import Data.Graph.Inductive hiding (trc, dom, order, inn, out, rc) import Data.Maybe import Data.List (foldl', foldl1', (\\), union, intersect) import Control.Monad.Writer hiding (fix) +import Control.Monad -- required for mtl-2.3 (GHC 9.6) import qualified Language.Fortran.Repr as Repr import qualified Language.Fortran.Repr.Eval.Value as Repr diff --git a/src/Language/Fortran/Analysis/ModGraph.hs b/src/Language/Fortran/Analysis/ModGraph.hs index adb32ac8..fdbe02ae 100644 --- a/src/Language/Fortran/Analysis/ModGraph.hs +++ b/src/Language/Fortran/Analysis/ModGraph.hs @@ -10,8 +10,8 @@ import Language.Fortran.Util.ModFile import Language.Fortran.Util.Files import Prelude hiding (mod) -import Control.Monad import Control.Monad.State.Strict +import Control.Monad ( forM_ ) -- required for mtl-2.3 (GHC 9.6) import Data.Data import Data.Generics.Uniplate.Data import Data.Graph.Inductive hiding (version) diff --git a/src/Language/Fortran/Analysis/Renaming.hs b/src/Language/Fortran/Analysis/Renaming.hs index 79468deb..9cbb5293 100644 --- a/src/Language/Fortran/Analysis/Renaming.hs +++ b/src/Language/Fortran/Analysis/Renaming.hs @@ -20,6 +20,7 @@ import qualified Data.List as L import Data.Map (insert, empty, lookup, Map) import qualified Data.Map.Strict as M import Control.Monad.State.Strict +import Control.Monad -- required for mtl-2.3 (GHC 9.6) import Data.Generics.Uniplate.Data import Data.Data import Data.Functor.Identity (Identity) diff --git a/src/Language/Fortran/Analysis/Types.hs b/src/Language/Fortran/Analysis/Types.hs index d2b684ce..536255cb 100644 --- a/src/Language/Fortran/Analysis/Types.hs +++ b/src/Language/Fortran/Analysis/Types.hs @@ -23,6 +23,7 @@ import Data.Maybe (maybeToList) import Data.List (find, foldl') import Control.Monad.State.Strict import Control.Monad.Reader +import Control.Monad -- required for mtl-2.3 (GHC 9.6) import Data.Generics.Uniplate.Data import Data.Data import Language.Fortran.Analysis diff --git a/src/Language/Fortran/Parser.hs b/src/Language/Fortran/Parser.hs index 0df6bff4..5c2c0811 100644 --- a/src/Language/Fortran/Parser.hs +++ b/src/Language/Fortran/Parser.hs @@ -23,7 +23,6 @@ module Language.Fortran.Parser -- * Other parsers , f90Expr - , f77lIncludesNoTransform , byVerFromFilename -- ** Statement diff --git a/src/Language/Fortran/Util/ModFile.hs b/src/Language/Fortran/Util/ModFile.hs index 67297422..b7f73cfe 100644 --- a/src/Language/Fortran/Util/ModFile.hs +++ b/src/Language/Fortran/Util/ModFile.hs @@ -71,6 +71,7 @@ import qualified Language.Fortran.Util.Position as P import Language.Fortran.Util.Files ( getDirContents ) import Control.Monad.State +import Control.Monad -- required for mtl-2.3 (GHC 9.6) import Data.Binary (Binary, encode, decodeOrFail) import qualified Data.ByteString.Lazy.Char8 as LB import Data.Data diff --git a/test/Language/Fortran/Parser/Free/Fortran95Spec.hs b/test/Language/Fortran/Parser/Free/Fortran95Spec.hs index 20d3ec9f..d317b2e6 100644 --- a/test/Language/Fortran/Parser/Free/Fortran95Spec.hs +++ b/test/Language/Fortran/Parser/Free/Fortran95Spec.hs @@ -15,7 +15,7 @@ import qualified Language.Fortran.Parser.Free.Fortran95 as F95 import qualified Language.Fortran.Parser.Free.Lexer as Free import qualified Data.List as List -import Data.Foldable(forM_) +import Control.Monad ( forM_ ) import qualified Data.ByteString.Char8 as B import Control.Exception (evaluate)