From 40cb2866bb4da51a8cac5e3792984744a64b016e Mon Sep 17 00:00:00 2001 From: Tillmann Vogt Date: Thu, 9 Nov 2023 20:36:52 +0100 Subject: [PATCH] Changes for ghc 9.4.7 --- repa-algorithms/repa-algorithms.cabal | 3 +- repa-examples/repa-examples.cabal | 44 ++++++++------------------- repa-io/repa-io.cabal | 2 +- repa/Data/Array/Repa/Eval/Elt.hs | 25 ++++++++------- 4 files changed, 27 insertions(+), 47 deletions(-) diff --git a/repa-algorithms/repa-algorithms.cabal b/repa-algorithms/repa-algorithms.cabal index 695e707e..20c8ad3f 100644 --- a/repa-algorithms/repa-algorithms.cabal +++ b/repa-algorithms/repa-algorithms.cabal @@ -19,7 +19,7 @@ Synopsis: Library Build-Depends: base >= 4.8 && < 5 - , vector >= 0.11 && < 0.13 + , vector >= 0.11 , repa == 3.4.1.* ghc-options: @@ -30,7 +30,6 @@ Library -funbox-strict-fields -fno-liberate-case -fno-warn-missing-signatures - -funfolding-keeness-factor=1000 -funfolding-use-threshold=1000 if impl(ghc >= 8.0) diff --git a/repa-examples/repa-examples.cabal b/repa-examples/repa-examples.cabal index fa46259f..ee2d5c65 100644 --- a/repa-examples/repa-examples.cabal +++ b/repa-examples/repa-examples.cabal @@ -25,7 +25,7 @@ Flag llvm Executable repa-canny Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-algorithms == 3.4.1.* @@ -34,7 +34,6 @@ Executable repa-canny ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 @@ -46,8 +45,8 @@ Executable repa-canny Executable repa-mmult Build-depends: - base >= 4.8 && < 4.15 - , random == 1.1.* + base >= 4.8 + , random == 1.2.* , repa == 3.4.1.* , repa-algorithms == 3.4.1.* , repa-io == 3.4.1.* @@ -58,13 +57,11 @@ Executable repa-mmult ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -72,7 +69,7 @@ Executable repa-mmult Executable repa-laplace Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-io == 3.4.1.* , template-haskell @@ -83,7 +80,6 @@ Executable repa-laplace ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 @@ -95,7 +91,7 @@ Executable repa-laplace Executable repa-fft2d Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-algorithms == 3.4.1.* , repa-io == 3.4.1.* @@ -105,13 +101,11 @@ Executable repa-fft2d ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -119,7 +113,7 @@ Executable repa-fft2d Executable repa-fft2d-highpass Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-algorithms == 3.4.1.* , repa-io == 3.4.1.* @@ -129,13 +123,11 @@ Executable repa-fft2d-highpass ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -143,7 +135,7 @@ Executable repa-fft2d-highpass Executable repa-fft3d-highpass Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-algorithms == 3.4.1.* @@ -152,13 +144,11 @@ Executable repa-fft3d-highpass ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -166,23 +156,21 @@ Executable repa-fft3d-highpass Executable repa-blur Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-algorithms == 3.4.1.* - , vector >= 0.11 && < 0.13 + , vector >= 0.11 Main-is: examples/Blur/src-repa/Main.hs hs-source-dirs: examples/Blur/src-repa . ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -190,7 +178,7 @@ Executable repa-blur Executable repa-sobel Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-algorithms == 3.4.1.* @@ -200,13 +188,11 @@ Executable repa-sobel ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -214,7 +200,7 @@ Executable repa-sobel Executable repa-volume Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* , repa-io == 3.4.1.* @@ -222,13 +208,11 @@ Executable repa-volume ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 @@ -236,22 +220,20 @@ Executable repa-volume Executable repa-unit-test Build-depends: - base >= 4.8 && < 4.15 + base >= 4.8 , repa == 3.4.1.* - , QuickCheck >= 2.8 && < 2.14 + , QuickCheck >= 2.8 Main-is: examples/UnitTesting/UnitTesting.hs hs-source-dirs: examples/UnitTesting . ghc-options: -rtsopts -threaded - -eventlog -O2 -fmax-simplifier-iterations=20 -fsimplifier-phases=3 -fno-liberate-case -funfolding-use-threshold100 - -funfolding-keeness-factor100 if flag(llvm) ghc-options: -fllvm -optlo-O3 diff --git a/repa-io/repa-io.cabal b/repa-io/repa-io.cabal index 30a6ddd2..e3d60a6b 100644 --- a/repa-io/repa-io.cabal +++ b/repa-io/repa-io.cabal @@ -24,7 +24,7 @@ Library , bytestring >= 0.10 && < 0.12 , old-time == 1.1.* , repa == 3.4.* - , vector >= 0.11 && < 0.13 + , vector >= 0.11 ghc-options: -O2 diff --git a/repa/Data/Array/Repa/Eval/Elt.hs b/repa/Data/Array/Repa/Eval/Elt.hs index f944739f..5ec09ee2 100644 --- a/repa/Data/Array/Repa/Eval/Elt.hs +++ b/repa/Data/Array/Repa/Eval/Elt.hs @@ -5,7 +5,6 @@ module Data.Array.Repa.Eval.Elt (Elt (..)) where import GHC.Prim -import GHC.Exts import GHC.Types import GHC.Word import GHC.Int @@ -125,7 +124,7 @@ instance Elt Bool where -- Floating ------------------------------------------------------------------- instance Elt Float where {-# INLINE touch #-} - touch (F# f) + touch f = IO (\state -> case touch# f state of state' -> (# state', () #)) @@ -138,7 +137,7 @@ instance Elt Float where instance Elt Double where {-# INLINE touch #-} - touch (D# d) + touch d = IO (\state -> case touch# d state of state' -> (# state', () #)) @@ -152,7 +151,7 @@ instance Elt Double where -- Int ------------------------------------------------------------------------ instance Elt Int where {-# INLINE touch #-} - touch (I# i) + touch i = IO (\state -> case touch# i state of state' -> (# state', () #)) @@ -164,7 +163,7 @@ instance Elt Int where instance Elt Int8 where {-# INLINE touch #-} - touch (I8# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -177,7 +176,7 @@ instance Elt Int8 where instance Elt Int16 where {-# INLINE touch #-} - touch (I16# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -190,7 +189,7 @@ instance Elt Int16 where instance Elt Int32 where {-# INLINE touch #-} - touch (I32# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -203,7 +202,7 @@ instance Elt Int32 where instance Elt Int64 where {-# INLINE touch #-} - touch (I64# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -217,7 +216,7 @@ instance Elt Int64 where -- Word ----------------------------------------------------------------------- instance Elt Word where {-# INLINE touch #-} - touch (W# i) + touch i = IO (\state -> case touch# i state of state' -> (# state', () #)) @@ -230,7 +229,7 @@ instance Elt Word where instance Elt Word8 where {-# INLINE touch #-} - touch (W8# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -243,7 +242,7 @@ instance Elt Word8 where instance Elt Word16 where {-# INLINE touch #-} - touch (W16# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -256,7 +255,7 @@ instance Elt Word16 where instance Elt Word32 where {-# INLINE touch #-} - touch (W32# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #)) @@ -269,7 +268,7 @@ instance Elt Word32 where instance Elt Word64 where {-# INLINE touch #-} - touch (W64# w) + touch w = IO (\state -> case touch# w state of state' -> (# state', () #))