From c3f7de3cb5cac214a0bf4a47c4f9ade2af965c33 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Wed, 19 Apr 2023 07:58:55 -0400 Subject: [PATCH] Support building with mtl-2.3.* (GHC 9.6) This makes two changes to `llvm-pretty-bc-parser` to make it build with GHC 9.6: * Because `mtl-2.3.*` no longer re-exports `Control.Monad` or `Control.Monad.Fix`, I needed to tighten up the imports in `Data.LLVM.BitCode.Parse` to make it build with GHC 9.6, which bundles `mtl-2.3.1`. * Bump the `llvm-pretty` submodule to bring in the changes from https://github.com/elliottt/llvm-pretty/pull/112 --- llvm-pretty | 2 +- src/Data/LLVM/BitCode/Parse.hs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/llvm-pretty b/llvm-pretty index a454fcbe..94e38484 160000 --- a/llvm-pretty +++ b/llvm-pretty @@ -1 +1 @@ -Subproject commit a454fcbe4192c07bcced2cf1384686dc7359a4a3 +Subproject commit 94e384842b214ba72446d1694446fb5261ab6ce2 diff --git a/src/Data/LLVM/BitCode/Parse.hs b/src/Data/LLVM/BitCode/Parse.hs index 9b81d528..5e4a7d9b 100644 --- a/src/Data/LLVM/BitCode/Parse.hs +++ b/src/Data/LLVM/BitCode/Parse.hs @@ -13,13 +13,15 @@ import Text.LLVM.AST import Text.LLVM.PP import Control.Applicative (Alternative(..)) +import Control.Monad (MonadPlus(..), unless) #if !MIN_VERSION_base(4,13,0) import Control.Monad.Fail (MonadFail) import qualified Control.Monad.Fail -- makes fail visible for instance #endif -import Control.Monad.Except -import Control.Monad.Reader -import Control.Monad.State.Strict +import Control.Monad.Fix (MonadFix) +import Control.Monad.Except (MonadError(..), Except, runExcept) +import Control.Monad.Reader (MonadReader(..), ReaderT(..)) +import Control.Monad.State.Strict (MonadState(..), StateT(..)) import Data.Maybe (fromMaybe) import Data.Semigroup import Data.Typeable (Typeable)