diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .travis.yml | 26 | ||||
-rw-r--r-- | nix/tasty-hedgehog.nix | 17 | ||||
-rw-r--r-- | release.nix | 26 | ||||
-rw-r--r-- | src/VeriFuzz/Config.hs | 28 | ||||
-rw-r--r-- | verifuzz.cabal | 2 |
6 files changed, 53 insertions, 47 deletions
@@ -4,6 +4,7 @@ TAGS *.log *~ cabal.project.local +result # Folders .stack-work diff --git a/.travis.yml b/.travis.yml index 05e684a..d8cc8ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1 @@ -sudo: false -language: minimal - -# Caching so the next build will be fast too. -cache: - directories: - - $HOME/.stack - -before_install: - # Download and unpack the stack executable - - mkdir -p ~/.local/bin - - export PATH=$HOME/.local/bin:$PATH - - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' - - stack config set system-ghc --global true - - export PATH=/opt/ghc/8.6.4/bin:$PATH - -addons: - apt: - sources: - - hvr-ghc - packages: - - ghc-8.6.4 - -script: - - stack --no-terminal --skip-ghc-check test --pedantic --fast +language: nix diff --git a/nix/tasty-hedgehog.nix b/nix/tasty-hedgehog.nix new file mode 100644 index 0000000..e9a937d --- /dev/null +++ b/nix/tasty-hedgehog.nix @@ -0,0 +1,17 @@ +{ mkDerivation, base, hedgehog, stdenv, tagged, tasty +, tasty-expected-failure +}: +mkDerivation { + pname = "tasty-hedgehog"; + version = "0.2.0.0"; + sha256 = "5a107fc3094efc50663e4634331a296281318b38c9902969c2d2d215d754a182"; + revision = "6"; + editedCabalFile = "0d7s1474pvnyad6ilr5rvpama7s468ya9ns4ksbl0827z9vvga43"; + libraryHaskellDepends = [ base hedgehog tagged tasty ]; + testHaskellDepends = [ + base hedgehog tasty tasty-expected-failure + ]; + homepage = "https://github.com/qfpl/tasty-hedgehog"; + description = "Integration for tasty and hedgehog"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/release.nix b/release.nix index d025a5b..a1e7605 100644 --- a/release.nix +++ b/release.nix @@ -1,12 +1,28 @@ let + composeExtensionsList = + pkgs.lib.fold pkgs.lib.composeExtensions (_: _: {}); + makeOverrides = + function: names: haskellPackagesNew: haskellPackagesOld: + let + toPackage = name: { + inherit name; + value = function haskellPackagesOld.${name}; + }; + + in + builtins.listToAttrs (map toPackage names); config = { packageOverrides = pkgs: rec { haskellPackages = pkgs.haskellPackages.override { - overrides = haskellPackagesNew: haskellPackagesOld: rec { - hedgehog-fn = haskellPackagesNew.callPackage ./nix/hedgehog-fn.nix {}; - tomland = haskellPackagesNew.callPackage ./nix/tomland.nix {}; - parser-combinators = haskellPackagesNew.callPackage ./nix/parser-combinators.nix {}; - }; + overrides = composeExtensionsList [ + (haskellPackagesNew: haskellPackagesOld: rec { + hedgehog-fn = haskellPackagesNew.callPackage ./nix/hedgehog-fn.nix {}; + tomland = haskellPackagesNew.callPackage ./nix/tomland.nix {}; + parser-combinators = haskellPackagesNew.callPackage ./nix/parser-combinators.nix {}; + tasty-hedgehog = haskellPackagesNew.callPackage ./nix/tasty-hedgehog.nix {}; + }) + (makeOverrides pkgs.haskell.lib.dontCheck ["tomland"]) + ]; }; }; }; diff --git a/src/VeriFuzz/Config.hs b/src/VeriFuzz/Config.hs index 0fc9435..86daaab 100644 --- a/src/VeriFuzz/Config.hs +++ b/src/VeriFuzz/Config.hs @@ -77,22 +77,18 @@ module VeriFuzz.Config ) where -import Control.Applicative ( Alternative ) -import Control.Lens hiding ( (.=) ) -import Data.List.NonEmpty ( NonEmpty(..) ) -import Data.Maybe ( fromMaybe ) -import Data.Text ( Text - , pack - ) -import qualified Data.Text.IO as T -import Data.Version ( showVersion ) +import Control.Applicative (Alternative) +import Control.Lens hiding ((.=)) +import Data.List.NonEmpty (NonEmpty (..)) +import Data.Maybe (fromMaybe) +import Data.Text (Text, pack) +import qualified Data.Text.IO as T +import Data.Version (showVersion) import Development.GitRev -import Hedgehog.Internal.Seed ( Seed ) -import Paths_verifuzz ( version ) -import Shelly ( toTextIgnore ) -import Toml ( TomlCodec - , (.=) - ) +import Hedgehog.Internal.Seed (Seed) +import Paths_verifuzz (version) +import Shelly (toTextIgnore) +import Toml (TomlCodec, (.=)) import qualified Toml import VeriFuzz.Sim.Quartus import VeriFuzz.Sim.Vivado @@ -203,7 +199,7 @@ data ConfProperty = ConfProperty { _propSize :: {-# UNPACK #-} !Int , _propMaxModules :: {-# UNPACK #-} !Int , _propSampleMethod :: !Text , _propSampleSize :: {-# UNPACK #-} !Int - , _propCombine :: {-# UNPACK #-} !Bool + , _propCombine :: !Bool } deriving (Eq, Show) diff --git a/verifuzz.cabal b/verifuzz.cabal index ef5761b..374d133 100644 --- a/verifuzz.cabal +++ b/verifuzz.cabal @@ -79,7 +79,7 @@ library , parsec >=3.1 && <3.2 , transformers >=0.5 && <0.6 , transformers-base >=0.4.5 && <0.5 - , tomland >=1.0 && <1.1 + , tomland >=1.0 && <1.2 , prettyprinter >=1.2.0.1 && <1.3 , array >=0.5 && <0.6 , recursion-schemes >=5.0.2 && <5.2 |