-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move plugin and internal definitions to local package
- Loading branch information
Showing
21 changed files
with
183 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright (c) 2024, Martijn Bastiaan | ||
2024, QBayLogic B.V. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Distribution.Simple | ||
import Prelude | ||
|
||
main :: IO () | ||
main = defaultMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
cabal-version: 2.4 | ||
name: clash-protocols-base | ||
synopsis: a battery-included library for (dataflow) protocols | ||
Homepage: https://gitlab.com/martijnbastiaan/clash-protocols | ||
version: 0.1 | ||
category: Hardware | ||
license: BSD-2-Clause | ||
license-file: LICENSE | ||
author: Martijn Bastiaan, QBayLogic B.V. | ||
maintainer: Martijn Bastiaan <[email protected]> | ||
|
||
flag ci | ||
Description: Running on CI? Used to set fail-on-warning flag. | ||
Manual: True | ||
Default: False | ||
|
||
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: | ||
BangPatterns | ||
BinaryLiterals | ||
ConstraintKinds | ||
CPP | ||
DataKinds | ||
DefaultSignatures | ||
DeriveAnyClass | ||
DeriveDataTypeable | ||
DeriveFoldable | ||
DeriveFunctor | ||
DeriveGeneric | ||
DeriveLift | ||
DeriveTraversable | ||
DerivingStrategies | ||
InstanceSigs | ||
KindSignatures | ||
LambdaCase | ||
NoStarIsType | ||
PolyKinds | ||
RankNTypes | ||
ScopedTypeVariables | ||
StandaloneDeriving | ||
TupleSections | ||
TypeApplications | ||
TypeFamilies | ||
TypeOperators | ||
ViewPatterns | ||
|
||
-- TemplateHaskell is used to support convenience functions such as | ||
-- 'listToVecTH' and 'bLit'. | ||
TemplateHaskell | ||
QuasiQuotes | ||
|
||
-- Prelude isn't imported by default as Clash offers Clash.Prelude | ||
-- NoImplicitPrelude | ||
ghc-options: | ||
-Wall -Wcompat | ||
|
||
-- Plugins to support type-level constraint solving on naturals | ||
-fplugin GHC.TypeLits.Extra.Solver | ||
-fplugin GHC.TypeLits.Normalise | ||
-fplugin GHC.TypeLits.KnownNat.Solver | ||
|
||
-- Clash needs access to the source code in compiled modules | ||
-fexpose-all-unfoldings | ||
|
||
-- Worker wrappers introduce unstable names for functions that might have | ||
-- blackboxes attached for them. You can disable this, but be sure to add | ||
-- a no-specialize pragma to every function with a blackbox. | ||
-fno-worker-wrapper | ||
|
||
if flag(ci) | ||
ghc-options: -Werror | ||
|
||
default-language: Haskell2010 | ||
build-depends: | ||
base >= 4.15.0.0, | ||
Cabal, | ||
|
||
clash-prelude >= 1.8.1 && < 1.10, | ||
ghc-typelits-natnormalise, | ||
ghc-typelits-extra, | ||
ghc-typelits-knownnat | ||
|
||
custom-setup | ||
setup-depends: | ||
base >= 4.11 && <5, | ||
Cabal >= 2.4, | ||
|
||
library | ||
import: common-options | ||
hs-source-dirs: src | ||
|
||
if flag(large-tuples) | ||
CPP-Options: -DLARGE_TUPLES | ||
|
||
build-depends: | ||
, circuit-notation | ||
, data-default | ||
, deepseq | ||
, extra | ||
, ghc >= 8.7 && < 9.7 | ||
, hashable | ||
, tagged | ||
, template-haskell | ||
|
||
exposed-modules: | ||
Protocols.Cpp | ||
Protocols.Internal | ||
Protocols.Internal.Classes | ||
Protocols.Internal.TaggedBundle | ||
Protocols.Internal.TaggedBundle.TH | ||
Protocols.Internal.TH | ||
Protocols.Internal.Units | ||
Protocols.Internal.Units.TH | ||
Protocols.Plugin | ||
Protocols.Plugin.Internal | ||
|
||
default-language: Haskell2010 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
resolver: lts-21.25 # ghc-9.4.8 | ||
|
||
packages: | ||
- clash-protocols-base | ||
- . | ||
|
||
extra-deps: | ||
|