From 2bb30c91135b341b2b0deb339ef09ba69c563dd4 Mon Sep 17 00:00:00 2001 From: "Dr. ERDI Gergo" Date: Fri, 12 Mar 2021 19:08:21 +0800 Subject: [PATCH] Update `singletons` to version 3.0, which is compatible with GHC 9.0 --- cabal.project | 23 +++++++++++++++++-- clash-prelude/clash-prelude.cabal | 2 +- .../src/Clash/Explicit/Signal/Delayed.hs | 4 ++++ clash-prelude/src/Clash/Sized/RTree.hs | 4 ++++ clash-prelude/src/Clash/Sized/Vector.hs | 4 ++++ 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/cabal.project b/cabal.project index 0a58df0ddb..f7f911a5df 100644 --- a/cabal.project +++ b/cabal.project @@ -14,7 +14,7 @@ packages: -- index state, to go along with the cabal.project.freeze file. update the index -- state by running `cabal update` twice and looking at the index state it -- displays to you (as the second update will be a no-op) -index-state: 2021-02-25T05:27:39Z +index-state: 2021-03-18T06:58:19Z -- For some reason the `clash-testsuite` executable fails to run without -- this, as it cannot find the related library... @@ -43,4 +43,23 @@ optional-packages: ./clash-cores allow-newer: - brick:base + brick:base, + vector-binary-instances:base, + cryptohash-sha256:base + +source-repository-package + type: git + location: https://github.com/kcsongor/generic-lens.git + tag: 8e1fc7dcf444332c474fca17110d4bc554db08c8 + subdir: generic-lens-core + +source-repository-package + type: git + location: https://github.com/kcsongor/generic-lens.git + tag: 8e1fc7dcf444332c474fca17110d4bc554db08c8 + subdir: generic-lens + +source-repository-package + type: git + location: https://github.com/haskell-hint/hint.git + tag: abdb192eace46ef71b7b4a2d4a67654248f8dbdb diff --git a/clash-prelude/clash-prelude.cabal b/clash-prelude/clash-prelude.cabal index 5d77c6476c..657061d9ca 100644 --- a/clash-prelude/clash-prelude.cabal +++ b/clash-prelude/clash-prelude.cabal @@ -335,7 +335,7 @@ Library recursion-schemes >= 5.1 && < 5.3, QuickCheck >= 2.7 && < 2.15, reflection >= 2 && < 2.2, - singletons >= 1.0 && < 3.0, + singletons >= 2.0 && < 3.1, template-haskell >= 2.12.0.0 && < 2.18, th-abstraction >= 0.2.10 && < 0.5.0, th-lift >= 0.7.0 && < 0.9, diff --git a/clash-prelude/src/Clash/Explicit/Signal/Delayed.hs b/clash-prelude/src/Clash/Explicit/Signal/Delayed.hs index fe10efd16c..885215d176 100644 --- a/clash-prelude/src/Clash/Explicit/Signal/Delayed.hs +++ b/clash-prelude/src/Clash/Explicit/Signal/Delayed.hs @@ -49,7 +49,11 @@ import Prelude ((.), (<$>), (<*>), id, Num(..)) import Data.Coerce (coerce) import Data.Kind (Type) import Data.Proxy (Proxy (..)) +#if MIN_VERSION_singletons(3,0,0) +import Data.Singletons (Apply, TyFun, type (@@)) +#else import Data.Singletons.Prelude (Apply, TyFun, type (@@)) +#endif import GHC.TypeLits (KnownNat, Nat, type (+), type (^), type (*)) import Clash.Sized.Vector diff --git a/clash-prelude/src/Clash/Sized/RTree.hs b/clash-prelude/src/Clash/Sized/RTree.hs index 9bba0ff3a1..030b6ab4d4 100644 --- a/clash-prelude/src/Clash/Sized/RTree.hs +++ b/clash-prelude/src/Clash/Sized/RTree.hs @@ -55,7 +55,11 @@ import Data.Default.Class (Default (..)) import Data.Either (isLeft) import Data.Foldable (toList) import Data.Kind (Type) +#if MIN_VERSION_singletons(3,0,0) +import Data.Singletons (Apply, TyFun, type (@@)) +#else import Data.Singletons.Prelude (Apply, TyFun, type (@@)) +#endif import Data.Proxy (Proxy (..)) import GHC.TypeLits (KnownNat, Nat, type (+), type (^), type (*)) import Language.Haskell.TH.Syntax (Lift(..)) diff --git a/clash-prelude/src/Clash/Sized/Vector.hs b/clash-prelude/src/Clash/Sized/Vector.hs index 39396cba8d..19f81f8336 100644 --- a/clash-prelude/src/Clash/Sized/Vector.hs +++ b/clash-prelude/src/Clash/Sized/Vector.hs @@ -109,7 +109,11 @@ import Data.Default.Class (Default (..)) import qualified Data.Foldable as F import Data.Kind (Type) import Data.Proxy (Proxy (..)) +#if MIN_VERSION_singletons(3,0,0) +import Data.Singletons (TyFun,Apply,type (@@)) +#else import Data.Singletons.Prelude (TyFun,Apply,type (@@)) +#endif import GHC.TypeLits (CmpNat, KnownNat, Nat, type (+), type (-), type (*), type (^), type (<=), natVal) import GHC.Base (Int(I#),Int#,isTrue#)