horizon-spec 0.4.1 → 0.5
raw patch · 12 files changed
+224/−97 lines, 12 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- dhall/package.dhall +28/−27
- horizon-spec.cabal +1/−1
- src/Horizon/Spec.hs +7/−3
- test/data/modified-overlay/input.dhall +13/−11
- test/data/modified-overlay/output.golden +32/−4
- test/data/modified-package-set/input.dhall +18/−16
- test/data/modified-package-set/output.golden +32/−4
- test/data/sample-overlay/input.dhall +12/−11
- test/data/sample-overlay/output.golden +32/−4
- test/data/sample-package-set/input.dhall +12/−12
- test/data/sample-package-set/output.golden +32/−4
ChangeLog.md view
@@ -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
dhall/package.dhall view
@@ -25,9 +25,24 @@ > 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 }@@ -72,42 +87,28 @@ > let callHackage- : Name → Version → PackageEntry+ : Name → Version → HaskellPackage.Type = λ(name : Name) → λ(version : Version) →- { mapKey = name- , mapValue = HaskellPackage::{- , source = HaskellSource.FromHackage { name, version }- }- }+ HaskellPackage::{ source = HaskellSource.FromHackage { name, version } } let callGit- : Name → Url → Revision → Optional Subdir → PackageEntry- = λ(name : Name) →- λ(url : Url) →+ : Url → Revision → Optional Subdir → HaskellPackage.Type+ = λ(url : Url) → λ(revision : Revision) → λ(subdir : Optional Subdir) →- { mapKey = name- , mapValue = HaskellPackage::{- , source = HaskellSource.FromGit { url, revision, subdir }- }+ HaskellPackage::{+ , source = HaskellSource.FromGit { url, revision, subdir } } let callLocal- : Name → Subdir → PackageEntry- = λ(name : Name) →- λ(subdir : Subdir) →- { mapKey = name- , mapValue = HaskellPackage::{ source = HaskellSource.FromLocal subdir }- }+ : Subdir → HaskellPackage.Type+ = λ(subdir : Subdir) →+ HaskellPackage::{ source = HaskellSource.FromLocal subdir } let callTarball- : Name → Url → PackageEntry- = λ(name : Name) →- λ(url : Url) →- { mapKey = name- , mapValue = HaskellPackage::{ source = HaskellSource.FromTarball url }- }+ : Url → HaskellPackage.Type+ = λ(url : Url) → HaskellPackage::{ source = HaskellSource.FromTarball url } let modPackageList : Modifiers.Type → PackageList → PackageList
horizon-spec.cabal view
@@ -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.
src/Horizon/Spec.hs view
@@ -10,7 +10,7 @@ , 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 @@ 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)
test/data/modified-overlay/input.dhall view
@@ -2,15 +2,17 @@ in H.modPackageList H.Modifiers::{ doCheck = True, doJailbreak = False }- [ H.callHackage "lens" "5.2"- , H.callGit- "Cabal-syntax"- "https://gitlab.haskell.org/ghc/packages/Cabal"- "e714824c6e652bf894f914bc57feccc15759668a"- (Some "Cabal-syntax")- , H.callTarball- "network-mux"- "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"- , H.callLocal "myPackage" "./myPackage"- ]+ ( toMap+ { lens = H.callHackage "lens" "5.2"+ , Cabal-syntax =+ H.callGit+ "https://gitlab.haskell.org/ghc/packages/Cabal"+ "e714824c6e652bf894f914bc57feccc15759668a"+ (Some "Cabal-syntax")+ , network-mux =+ H.callTarball+ "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"+ , myPackage = H.callLocal "./myPackage"+ }+ ) : H.Overlay
test/data/modified-overlay/output.golden view
@@ -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 > } }
test/data/modified-package-set/input.dhall view
@@ -1,19 +1,21 @@ let H = ../../../dhall/package.dhall -in H.modPackageSet- H.Modifiers::{ doCheck = True, doJailbreak = False }- { compiler = "ghc-9.4.2"- , packages =- [ H.callHackage "lens" "5.2"- , H.callGit- "Cabal-syntax"- "https://gitlab.haskell.org/ghc/packages/Cabal"- "e714824c6e652bf894f914bc57feccc15759668a"- (Some "Cabal-syntax")- , H.callTarball- "network-mux"- "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"- , H.callLocal "myPackage" "./myPackage"- ]- }+in { compiler = "ghc-9.4.2"+ , packages =+ H.modPackageList+ H.Modifiers::{ doCheck = True, doJailbreak = False }+ ( toMap+ { lens = H.callHackage "lens" "5.2"+ , Cabal-syntax =+ H.callGit+ "https://gitlab.haskell.org/ghc/packages/Cabal"+ "e714824c6e652bf894f914bc57feccc15759668a"+ (Some "Cabal-syntax")+ , network-mux =+ H.callTarball+ "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"+ , myPackage = H.callLocal "./myPackage"+ }+ )+ } : H.PackageSet
test/data/modified-package-set/output.golden view
@@ -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 > } }
test/data/sample-overlay/input.dhall view
@@ -1,14 +1,15 @@ let H = ../../../dhall/package.dhall -in [ H.callHackage "lens" "5.2"- , H.callGit- "Cabal-syntax"- "https://gitlab.haskell.org/ghc/packages/Cabal"- "e714824c6e652bf894f914bc57feccc15759668a"- (Some "Cabal-syntax")- , H.callTarball- "network-mux"- "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"- , H.callLocal "myPackage" "./myPackage"- ]+in toMap+ { lens = H.callHackage "lens" "5.2"+ , Cabal-syntax =+ H.callGit+ "https://gitlab.haskell.org/ghc/packages/Cabal"+ "e714824c6e652bf894f914bc57feccc15759668a"+ (Some "Cabal-syntax")+ , network-mux =+ H.callTarball+ "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"+ , myPackage = H.callLocal "./myPackage"+ } : H.Overlay
test/data/sample-overlay/output.golden view
@@ -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 > } }
test/data/sample-package-set/input.dhall view
@@ -1,17 +1,17 @@ let H = ../../../dhall/package.dhall in { compiler = "ghc-9.4.2"- , packages =- [ H.callHackage "lens" "5.2"- , H.callGit- "Cabal-syntax"- "https://gitlab.haskell.org/ghc/packages/Cabal"- "e714824c6e652bf894f914bc57feccc15759668a"- (Some "Cabal-syntax")- , H.callTarball- "network-mux"- "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"- , H.callLocal "myPackage" "./myPackage"- ]+ , packages = toMap+ { lens = H.callHackage "lens" "5.2"+ , Cabal-syntax =+ H.callGit+ "https://gitlab.haskell.org/ghc/packages/Cabal"+ "e714824c6e652bf894f914bc57feccc15759668a"+ (Some "Cabal-syntax")+ , network-mux =+ H.callTarball+ "https://input-output-hk.github.io/cardano-haskell-packages/package/network-mux-0.2.0.0.tar.gz"+ , myPackage = H.callLocal "./myPackage"+ } } : H.PackageSet
test/data/sample-package-set/output.golden view
@@ -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 > } }