Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building with GHC 9.10 #110

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clash-protocols-base/clash-protocols-base.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ library
, data-default
, deepseq
, extra
, ghc >= 8.7 && < 9.7
, ghc >= 8.7 && < 9.11
, hashable
, tagged
, template-haskell
Expand Down
1 change: 0 additions & 1 deletion clash-protocols/clash-protocols.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ library
, data-default
, deepseq
, extra
, ghc >= 8.7 && < 9.7
, hashable
, hedgehog >= 1.0.2
, lifted-async
Expand Down
4 changes: 3 additions & 1 deletion clash-protocols/src/Protocols/Avalon/Stream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DerivingStrategies #-}
-- Hashable (Unsigned n)
{-# OPTIONS_GHC -fno-warn-orphans #-}

Expand Down Expand Up @@ -140,7 +141,8 @@ Manager can only send 'AvalonStreamM2S' when '_ready' was true
@readyLatency@ clock cycles ago.
-}
newtype AvalonStreamS2M (readyLatency :: Nat) = AvalonStreamS2M {_ready :: Bool}
deriving (Generic, C.NFDataX, C.ShowX, Eq, NFData, Show, Bundle)
deriving stock (Generic, Show, Eq)
deriving anyclass (C.NFDataX, C.ShowX, NFData, Bundle)

-- | Type for Avalon Stream protocol.
data AvalonStream (dom :: Domain) (conf :: AvalonStreamConfig) (dataType :: Type)
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Axi4/ReadAddress.hs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ data
-- | See Table A2-5 "Read address channel signals"
newtype S2M_ReadAddress = S2M_ReadAddress
{_arready :: Bool}
deriving (Show, Generic, C.NFDataX)
deriving stock (Show, Generic)
deriving anyclass (C.NFDataX)

{- | Shorthand for a "well-behaved" read address config,
so that we don't need to write out a bunch of type constraints later.
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Axi4/ReadData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ data

-- | See Table A2-6 "Read data channel signals"
newtype M2S_ReadData = M2S_ReadData {_rready :: Bool}
deriving (Show, Generic, C.NFDataX)
deriving stock (Show, Generic)
deriving anyclass (C.NFDataX)

{- | Shorthand for a "well-behaved" read data config,
so that we don't need to write out a bunch of type constraints later.
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Axi4/Stream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ Manager may not decide whether or not to send 'Nothing' based on
the '_tready' signal.
-}
newtype Axi4StreamS2M = Axi4StreamS2M {_tready :: Bool}
deriving (Generic, C.NFDataX, C.ShowX, Eq, NFData, Show, Bundle)
deriving stock (Show, Eq, Generic)
deriving anyclass (C.NFDataX, C.ShowX, NFData, Bundle)

-- | Type for AXI4 Stream protocol.
data Axi4Stream (dom :: Domain) (conf :: Axi4StreamConfig) (userType :: Type)
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Axi4/WriteAddress.hs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ data

-- | See Table A2-2 "Write address channel signals"
newtype S2M_WriteAddress = S2M_WriteAddress {_awready :: Bool}
deriving (Show, Generic, C.NFDataX)
deriving stock (Show, Generic)
deriving anyclass (C.NFDataX)

{- | Shorthand for a "well-behaved" write address config,
so that we don't need to write out a bunch of type constraints later.
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Axi4/WriteData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ data

-- | See Table A2-3 "Write data channel signals"
newtype S2M_WriteData = S2M_WriteData {_wready :: Bool}
deriving (Show, Generic, C.NFDataX)
deriving stock (Show, Generic)
deriving anyclass (C.NFDataX)

{- | Shorthand for a "well-behaved" write data config,
so that we don't need to write out a bunch of type constraints later.
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Axi4/WriteResponse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ data

-- | See Table A2-4 "Write response channel signals"
newtype M2S_WriteResponse = M2S_WriteResponse {_bready :: Bool}
deriving (Show, Generic, C.NFDataX)
deriving stock (Show, Generic)
deriving anyclass (C.NFDataX)

{- | Shorthand for a "well-behaved" write response config,
so that we don't need to write out a bunch of type constraints later.
Expand Down
3 changes: 2 additions & 1 deletion clash-protocols/src/Protocols/Wishbone.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ instance (C.ShowX dat) => Show (WishboneS2M dat) where
increase throughput by reducing handshake-overhead
-}
newtype CycleTypeIdentifier = CycleTypeIdentifier (C.BitVector 3)
deriving (NFData, C.Generic, C.NFDataX, Show, C.ShowX, Eq, C.BitPack)
deriving stock (Eq, Show, C.Generic)
deriving anyclass (NFData, C.NFDataX, C.ShowX, C.BitPack)

pattern
Classic
Expand Down
Loading