From 1a77298f64292866d247550f8696b549eb0aff11 Mon Sep 17 00:00:00 2001 From: Gergo ERDI Date: Thu, 31 Aug 2023 21:13:56 +0800 Subject: [PATCH 1/3] Avoid spurious warning if `Prelude` already re-exports `(<$>)` --- src/Z80/Assembler.hs | 5 +++++ src/Z80/Operations.hs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/Z80/Assembler.hs b/src/Z80/Assembler.hs index 8d2e2e9..03db445 100644 --- a/src/Z80/Assembler.hs +++ b/src/Z80/Assembler.hs @@ -1,5 +1,8 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} +{-# LANGUAGE CPP #-} + {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Z80.Assembler @@ -25,8 +28,10 @@ import Data.ByteString (ByteString) import Control.Monad.RWS import Data.Maybe +#if !MIN_VERSION_base(4,8,0) import Control.Applicative import Data.Traversable (traverse) +#endif import Prelude import Z80.Operands diff --git a/src/Z80/Operations.hs b/src/Z80/Operations.hs index 01542a9..372e281 100644 --- a/src/Z80/Operations.hs +++ b/src/Z80/Operations.hs @@ -3,6 +3,7 @@ {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module Z80.Operations @@ -107,7 +108,9 @@ import Data.Word import Z80.Assembler import Z80.Operands +#if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) +#endif import Control.Monad ((>=>)) import Prelude hiding (and, or) From eaef934efb8a09b854fe5f546bd8a105f5dfc0e4 Mon Sep 17 00:00:00 2001 From: Gergo ERDI Date: Thu, 31 Aug 2023 21:14:28 +0800 Subject: [PATCH 2/3] GHC 9.4 compatibility --- src/Z80/Operations.hs | 1 + z80.cabal | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Z80/Operations.hs b/src/Z80/Operations.hs index 372e281..4d6af08 100644 --- a/src/Z80/Operations.hs +++ b/src/Z80/Operations.hs @@ -1,4 +1,5 @@ {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE UndecidableInstances #-} diff --git a/z80.cabal b/z80.cabal index 7a2b064..d41f117 100644 --- a/z80.cabal +++ b/z80.cabal @@ -19,7 +19,7 @@ library Z80.Operands, Z80.Operands.LowerCase, Z80.Macros - build-depends: base >=4.7 && <4.9, + build-depends: base >=4.7, bytestring, mtl hs-source-dirs: src @@ -29,7 +29,7 @@ library test-suite tests type: exitcode-stdio-1.0 main-is: tests.hs - build-depends: base >=4.7 && <4.9, + build-depends: base >=4.7, bytestring, mtl, HUnit, @@ -37,4 +37,4 @@ test-suite tests tasty-hunit hs-source-dirs: tests, src ghc-options: -Wall - default-language: Haskell2010 \ No newline at end of file + default-language: Haskell2010 From 0d90e8ef074a3a3ab63e8a104db9e85d2a47de7d Mon Sep 17 00:00:00 2001 From: Gergo ERDI Date: Sat, 30 May 2026 09:27:52 +0800 Subject: [PATCH 3/3] GHC 9.10 compatibility --- src/Z80/Assembler.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Z80/Assembler.hs b/src/Z80/Assembler.hs index 03db445..6f9b350 100644 --- a/src/Z80/Assembler.hs +++ b/src/Z80/Assembler.hs @@ -25,6 +25,7 @@ import Data.Word import qualified Data.ByteString as BS import Data.ByteString (ByteString) +import Control.Monad.Fix (MonadFix(..)) import Control.Monad.RWS import Data.Maybe