packages feed

clash-protocols-base-0.1: clash-protocols-base.cabal

cabal-version: 2.4
name: clash-protocols-base
synopsis: Internal support package for clash-protocols; use clash-protocols instead.
homepage: https://github.com/clash-lang/clash-protocols
bug-reports: https://github.com/clash-lang/clash-protocols/issues
version: 0.1
category: Hardware
license: BSD-2-Clause
license-file: LICENSE
author: Martijn Bastiaan, QBayLogic B.V.
maintainer: QBayLogic B.V. <devops@qbaylogic.com>
extra-doc-files:
  CHANGELOG.md
description:
  Internal core plugin and protocol support types for the clash-protocols
  package family. Users should depend on @clash-protocols@ instead.

source-repository head
  type: git
  location: https://github.com/clash-lang/clash-protocols.git

flag large-tuples
  description:
    Generate instances for classes such as `Units` and `TaggedBundle` for tuples
    up to and including 62 elements - the GHC imposed maximum. Note that this
    greatly increases compile times for `clash-protocols-base`.

  default: False
  manual: True

common common-options
  default-extensions:
    -- TemplateHaskell is used to support convenience functions such as
    -- 'listToVecTH' and 'bLit'.
    CPP
    DataKinds
    DefaultSignatures
    DeriveAnyClass
    DerivingStrategies
    LambdaCase
    NoStarIsType
    OverloadedRecordDot
    QuasiQuotes
    TemplateHaskell
    TupleSections
    TypeFamilies
    ViewPatterns

  -- Prelude isn't imported by default as Clash offers Clash.Prelude
  -- NoImplicitPrelude
  ghc-options:
    -- `-fexpose-all-unfoldings` is required because clash needs access to the
    -- source code in compiled modules
    -Wall
    -Wcompat
    -fexpose-all-unfoldings

  default-language: GHC2021
  build-depends:
    Cabal >=3.12 && <3.17,
    base >=4.18 && <5,
    clash-prelude >=1.10 && <1.12,

library
  import: common-options
  hs-source-dirs: src

  if flag(large-tuples)
    cpp-options: -DLARGE_TUPLES
  build-depends:
    circuit-notation >=0.2 && <0.3,
    deepseq >=1.4.1 && <1.6,
    extra >=1.6.17 && <1.9,
    ghc >=9.6 && <9.13,
    hashable >=1.4.1 && <1.6,
    tagged >=0.8 && <0.9,
    template-haskell >=2.20 && <2.24,

  exposed-modules:
    Protocols.Plugin
    Protocols.Plugin.Cpp
    Protocols.Plugin.Internal
    Protocols.Plugin.TH
    Protocols.Plugin.TaggedBundle
    Protocols.Plugin.TaggedBundle.TH
    Protocols.Plugin.Units
    Protocols.Plugin.Units.TH

  other-modules:
    Protocols.Plugin.Types

  default-language: GHC2021