From f071cf5381c019ae9d80bd0007a5b7a90c9bf1b1 Mon Sep 17 00:00:00 2001 From: t-wallet Date: Thu, 14 Nov 2024 10:19:54 +0100 Subject: [PATCH] Constrain data-default version bounds data-default 0.8 introduced a breaking change: it doesn't export Default from data-default-class anymore. This is currently not compatible with clash-prelude, so we need to introduce version bounds. Once circuit-notation does not require Default anymore, we have the possibility to relax these bounds again (if we want). --- clash-protocols-base/clash-protocols-base.cabal | 1 - clash-protocols/clash-protocols.cabal | 2 +- clash-protocols/src/Protocols.hs | 2 +- clash-protocols/src/Protocols/Df.hs | 2 +- clash-protocols/src/Protocols/DfConv.hs | 2 +- clash-protocols/src/Protocols/Internal.hs | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/clash-protocols-base/clash-protocols-base.cabal b/clash-protocols-base/clash-protocols-base.cabal index 19b2762e..8eabf2bd 100644 --- a/clash-protocols-base/clash-protocols-base.cabal +++ b/clash-protocols-base/clash-protocols-base.cabal @@ -102,7 +102,6 @@ library build-depends: , circuit-notation - , data-default-class , deepseq , extra , ghc >= 8.7 && < 9.7 diff --git a/clash-protocols/clash-protocols.cabal b/clash-protocols/clash-protocols.cabal index 89f8e717..8e9b3020 100644 --- a/clash-protocols/clash-protocols.cabal +++ b/clash-protocols/clash-protocols.cabal @@ -116,7 +116,7 @@ library , clash-protocols-base , circuit-notation , clash-prelude-hedgehog - , data-default-class + , data-default ^>= 0.7.1.1 , deepseq , extra , ghc >= 8.7 && < 9.7 diff --git a/clash-protocols/src/Protocols.hs b/clash-protocols/src/Protocols.hs index 09595b69..0fbf89b5 100644 --- a/clash-protocols/src/Protocols.hs +++ b/clash-protocols/src/Protocols.hs @@ -63,6 +63,6 @@ module Protocols ( TaggedBundle (..), ) where -import Data.Default.Class (def) +import Data.Default (def) import Protocols.Df (Df) import Protocols.Internal diff --git a/clash-protocols/src/Protocols/Df.hs b/clash-protocols/src/Protocols/Df.hs index d2568fb0..29eddc56 100644 --- a/clash-protocols/src/Protocols/Df.hs +++ b/clash-protocols/src/Protocols/Df.hs @@ -1094,7 +1094,7 @@ For a generalized version of 'simulate', check out 'Protocols.simulateC'. simulate :: forall dom a b. (C.KnownDomain dom) => - -- | Simulation configuration. Use 'Data.Default.Class.def' for sensible defaults. + -- | Simulation configuration. Use 'Data.Default.def' for sensible defaults. SimulationConfig -> -- | Circuit to simulate. ( C.Clock dom -> diff --git a/clash-protocols/src/Protocols/DfConv.hs b/clash-protocols/src/Protocols/DfConv.hs index 19856a76..e6eccc95 100644 --- a/clash-protocols/src/Protocols/DfConv.hs +++ b/clash-protocols/src/Protocols/DfConv.hs @@ -1511,7 +1511,7 @@ simulate :: ) => Proxy dfA -> Proxy dfB -> - -- | Simulation configuration. Use 'Data.Default.Class.def' for sensible defaults. + -- | Simulation configuration. Use 'Data.Default.def' for sensible defaults. SimulationConfig -> -- | Circuit to simulate. ( Clock (Dom dfA) -> diff --git a/clash-protocols/src/Protocols/Internal.hs b/clash-protocols/src/Protocols/Internal.hs index c672b407..786a77ef 100644 --- a/clash-protocols/src/Protocols/Internal.hs +++ b/clash-protocols/src/Protocols/Internal.hs @@ -40,7 +40,7 @@ import Protocols.Plugin.Units import Control.Arrow ((***)) import Data.Coerce (coerce) -import Data.Default.Class (Default (def)) +import Data.Default (Default (def)) import Data.Functor.Identity (Identity (..), runIdentity) import Data.Kind (Type) import Data.Tuple (swap)