diff --git a/ChangeLog.md b/ChangeLog.md index bfd0cef3fd9a40fbf474fdeab10aebb1273664af..153dcf26f3275b930cd8ada62d2fbe453a752653 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,10 @@ # Changelog for horizon-spec +## v0.5 + +* Add `doBenchmark`, `includeBenchmarks`, `includeExecutables` and + `includeTests` Modifiers. + ## v0.4.1 * Add `PackagesDir` to the list of exports diff --git a/dhall/package.dhall b/dhall/package.dhall index 87c3c431efc60abc1f3cb01f3f2e1d2036589dff..f85cbbab7977dc686c2c50f0b847a9ed0c33cf02 100644 --- a/dhall/package.dhall +++ b/dhall/package.dhall @@ -25,9 +25,24 @@ let HaskellSource = > let Modifiers = - { Type = { doJailbreak : Bool, doCheck : Bool, enableProfiling : Bool } + { Type = + { doBenchmark : Bool + , doCheck : Bool + , doJailbreak : Bool + , enableProfiling : Bool + , includeBenchmarks : Bool + , includeExecutables : Bool + , includeTests : Bool + } , default = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } } let Attr = λ(a : Type) → { mapKey : Text, mapValue : a } diff --git a/horizon-spec.cabal b/horizon-spec.cabal index c0ad38c2e97f00bb7aafd3dc9db2d1b8020f0ddf..008082f0804a9a39c284106e8fcf3413e0dcd9cd 100644 --- a/horizon-spec.cabal +++ b/horizon-spec.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: horizon-spec -version: 0.4.1 +version: 0.5 synopsis: Horizon Stable Package Set Type Definitions description: This package contains the type definitions for the Horizon stable package set (https://horizon-haskell.net). This is a schema used to define package sets sourcing from hackage and git. diff --git a/src/Horizon/Spec.hs b/src/Horizon/Spec.hs index 3253cd386e6293cbd1cb9d6862fd446852365845..0467b223f354614db0ec820f6d61ddd7b71f38f1 100644 --- a/src/Horizon/Spec.hs +++ b/src/Horizon/Spec.hs @@ -10,7 +10,7 @@ module Horizon.Spec , HaskellSource(FromGit, FromHackage, FromTarball, FromLocal) , HorizonExport(MakePackageSet, MakeOverlay) , LocalSource(MkLocalSource, fromLocalSource) - , Modifiers(doJailbreak, doCheck, enableProfiling) + , Modifiers(doJailbreak, doBenchmark, doCheck, enableProfiling, includeBenchmarks, includeExecutables, includeTests) , Name(MkName, fromName) , OverlayExportSettings(MkOverlayExportSettings, packagesDir, overlayFile, overlay) , OverlayFile(MkOverlayFile, fromOverlayFile) @@ -110,9 +110,13 @@ data CabalFlag where type Modifiers :: Type data Modifiers where - MkModifiers :: { doJailbreak :: Bool + MkModifiers :: { doBenchmark :: Bool , doCheck :: Bool - , enableProfiling :: Bool } -> Modifiers + , doJailbreak :: Bool + , enableProfiling :: Bool + , includeBenchmarks :: Bool + , includeExecutables :: Bool + , includeTests :: Bool } -> Modifiers deriving stock (Show, Eq, Generic) deriving anyclass (FromDhall, ToDhall) diff --git a/test/data/modified-overlay/output.golden b/test/data/modified-overlay/output.golden index bad6c050f31363cfed69f2372adb402454d210c3..97941e7e1496e38fdc787449f4f68aff0e5a7481 100644 --- a/test/data/modified-overlay/output.golden +++ b/test/data/modified-overlay/output.golden @@ -11,7 +11,14 @@ , subdir = Some "Cabal-syntax/" } , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -25,7 +32,14 @@ >.FromHackage { name = "lens", version = "5.2" } , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -39,7 +53,14 @@ >.FromLocal "myPackage/" , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -53,7 +74,14 @@ >.FromTarball "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz" , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } diff --git a/test/data/modified-package-set/output.golden b/test/data/modified-package-set/output.golden index c343150d78bdd9ad9d9832691a884e3cc08ba0f1..5f0ae5ea253357e893a33565dcd20e4993fc9ee6 100644 --- a/test/data/modified-package-set/output.golden +++ b/test/data/modified-package-set/output.golden @@ -13,7 +13,14 @@ , subdir = Some "Cabal-syntax/" } , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -27,7 +34,14 @@ >.FromHackage { name = "lens", version = "5.2" } , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -41,7 +55,14 @@ >.FromLocal "myPackage/" , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -55,7 +76,14 @@ >.FromTarball "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz" , modifiers = - { doJailbreak = False, doCheck = True, enableProfiling = True } + { doBenchmark = False + , doCheck = True + , doJailbreak = False + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } diff --git a/test/data/sample-overlay-export/output.golden b/test/data/sample-overlay-export/output.golden index 03d0c7adf1dbc3bded323a7066fb072deb0b9535..08596d7ebf434a1a876017dcfa6e16ac7d58e98b 100644 --- a/test/data/sample-overlay-export/output.golden +++ b/test/data/sample-overlay-export/output.golden @@ -18,9 +18,13 @@ | FromTarball : Text > , modifiers : - { doJailbreak : Bool + { doBenchmark : Bool , doCheck : Bool + , doJailbreak : Bool , enableProfiling : Bool + , includeBenchmarks : Bool + , includeExecutables : Bool + , includeTests : Bool } , flags : List < Enable : Text | Disable : Text > } @@ -42,7 +46,14 @@ | FromTarball : Text > , modifiers : - { doJailbreak : Bool, doCheck : Bool, enableProfiling : Bool } + { doBenchmark : Bool + , doCheck : Bool + , doJailbreak : Bool + , enableProfiling : Bool + , includeBenchmarks : Bool + , includeExecutables : Bool + , includeTests : Bool + } , flags : List < Enable : Text | Disable : Text > } } @@ -64,7 +75,14 @@ , subdir = Some "Cabal-syntax/" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -78,7 +96,14 @@ >.FromHackage { name = "lens", version = "5.2" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -92,7 +117,14 @@ >.FromLocal "myPackage/" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -106,7 +138,14 @@ >.FromTarball "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } diff --git a/test/data/sample-overlay/output.golden b/test/data/sample-overlay/output.golden index 19b830cadd34c11aa2d470be38b6606e95e2378e..9c37442cc98b61c1142a5ca981999fd0c914d24f 100644 --- a/test/data/sample-overlay/output.golden +++ b/test/data/sample-overlay/output.golden @@ -11,7 +11,14 @@ , subdir = Some "Cabal-syntax/" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -25,7 +32,14 @@ >.FromHackage { name = "lens", version = "5.2" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -39,7 +53,14 @@ >.FromLocal "myPackage/" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -53,7 +74,14 @@ >.FromTarball "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } diff --git a/test/data/sample-package-set-export/output.golden b/test/data/sample-package-set-export/output.golden index 08667b27f19bbfe39b6d85fce887e8727af6f337..a7e4bddcbd345b09e7607a96e7dd7be335242cc2 100644 --- a/test/data/sample-package-set-export/output.golden +++ b/test/data/sample-package-set-export/output.golden @@ -18,9 +18,13 @@ | FromTarball : Text > , modifiers : - { doJailbreak : Bool + { doBenchmark : Bool , doCheck : Bool + , doJailbreak : Bool , enableProfiling : Bool + , includeBenchmarks : Bool + , includeExecutables : Bool + , includeTests : Bool } , flags : List < Enable : Text | Disable : Text > } @@ -42,7 +46,14 @@ | FromTarball : Text > , modifiers : - { doJailbreak : Bool, doCheck : Bool, enableProfiling : Bool } + { doBenchmark : Bool + , doCheck : Bool + , doJailbreak : Bool + , enableProfiling : Bool + , includeBenchmarks : Bool + , includeExecutables : Bool + , includeTests : Bool + } , flags : List < Enable : Text | Disable : Text > } } @@ -67,7 +78,14 @@ , subdir = Some "Cabal-syntax/" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -82,7 +100,14 @@ >.FromHackage { name = "lens", version = "5.2" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -97,7 +122,14 @@ >.FromLocal "myPackage/" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -112,7 +144,14 @@ >.FromTarball "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } diff --git a/test/data/sample-package-set/output.golden b/test/data/sample-package-set/output.golden index 125fd8f9b930d56be7406348fdec95955aeae3d0..1f4ecab2aa9e7b995163fb828e3dd93494d6ad98 100644 --- a/test/data/sample-package-set/output.golden +++ b/test/data/sample-package-set/output.golden @@ -13,7 +13,14 @@ , subdir = Some "Cabal-syntax/" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -27,7 +34,14 @@ >.FromHackage { name = "lens", version = "5.2" } , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -41,7 +55,14 @@ >.FromLocal "myPackage/" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } } @@ -55,7 +76,14 @@ >.FromTarball "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz" , modifiers = - { doJailbreak = True, doCheck = False, enableProfiling = True } + { doBenchmark = False + , doCheck = False + , doJailbreak = True + , enableProfiling = True + , includeBenchmarks = True + , includeExecutables = True + , includeTests = True + } , flags = [] : List < Enable : Text | Disable : Text > } }