PPU/PPU.cabal

131 lines
3.2 KiB
Plaintext

cabal-version: 3.4
name: PPU
version: 1.0
license: MIT
author: Nor Führ <nor@acorneroftheweb.com>
maintainer: Nor Führ <nor@acorneroftheweb.com>
common common-options
default-extensions:
BangPatterns
BinaryLiterals
ConstraintKinds
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
-haddock
-- 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
-- Strict annotations - while sometimes preventing space leaks - trigger
-- optimizations Clash can't deal with. See:
--
-- https://github.com/clash-lang/clash-compiler/issues/2361
--
-- These flags disables these optimizations. Note that the fields will
-- remain strict.
-fno-unbox-small-strict-fields
-fno-unbox-strict-fields
build-depends:
base,
Cabal,
-- clash-prelude will set suitable version bounds for the plugins
clash-prelude >= 1.6.4 && < 1.8,
ghc-typelits-natnormalise,
ghc-typelits-extra,
ghc-typelits-knownnat,
library
import: common-options
hs-source-dirs: src
exposed-modules:
Example.Project
default-language: Haskell2010
-- Builds the executable 'clash', with PPU project in scope
executable clash
main-is: app/Clash.hs
default-language: Haskell2010
Build-Depends: base, clash-ghc, PPU
if !os(Windows)
ghc-options: -dynamic
-- Builds the executable 'clashi', with PPU project in scope
executable clashi
main-is: app/Clashi.hs
default-language: Haskell2010
if !os(Windows)
ghc-options: -dynamic
build-depends: base, clash-ghc, PPU
test-suite doctests
type: exitcode-stdio-1.0
default-language: Haskell2010
main-is: doctests.hs
ghc-options: -Wall -Wcompat -threaded
hs-source-dirs: tests
build-depends:
base,
PPU,
doctest-parallel >= 0.2 && < 0.4,
test-suite test-library
import: common-options
default-language: Haskell2010
hs-source-dirs: tests
type: exitcode-stdio-1.0
ghc-options: -threaded
main-is: unittests.hs
other-modules:
Tests.Example.Project
build-depends:
PPU,
QuickCheck,
hedgehog,
tasty >= 1.2 && < 1.5,
tasty-hedgehog,
tasty-th