From 8ebd54a5fca390518b9ac4e764b88034990fa277 Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Sat, 3 Aug 2024 18:17:41 -0400 Subject: [PATCH 1/7] Build with ghc(js)-9.10 --- cabal.project | 3 +++ patch.cabal | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cabal.project b/cabal.project index e6fdbadb..6210c002 100644 --- a/cabal.project +++ b/cabal.project @@ -1 +1,4 @@ packages: . + +if arch(javascript) + extra-packages: ghci diff --git a/patch.cabal b/patch.cabal index 6817319b..060a647d 100644 --- a/patch.cabal +++ b/patch.cabal @@ -37,13 +37,13 @@ flag hlint library hs-source-dirs: src default-language: Haskell2010 - build-depends: base >= 4.9 && < 4.19 + build-depends: base >= 4.9 && <= 4.21 , constraints-extras >= 0.3 && < 0.5 - , commutative-semigroups >= 0.0 && < 0.2 - , containers >= 0.6 && < 0.7 + , commutative-semigroups >= 0.0 && <= 0.2.0.1 + , containers >= 0.6 && <= 0.7 , dependent-map >= 0.3 && < 0.5 , dependent-sum >= 0.6 && < 0.8 - , lens >= 4.7 && < 5.3 + , lens >= 4.7 && <= 5.3.2 , indexed-traversable >= 0.1 && < 0.2 , semigroupoids >= 4.0 && < 7 , transformers >= 0.5.6.0 && < 0.7 @@ -86,7 +86,7 @@ test-suite tests , containers , hedgehog , HUnit - if impl(ghcjs) + if impl(ghcjs) || arch(javascript) buildable: False test-suite hlint @@ -106,7 +106,7 @@ test-suite hlint else build-depends: hlint >= 3.5 && < 3.6 - if impl(ghcjs) || !flag(hlint) + if impl(ghcjs) || arch(javascript) || !flag(hlint) buildable: False source-repository head From be360ef2ed0df2efa68bdbe8b0d5865df7a701fc Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Wed, 7 Aug 2024 05:14:21 +0400 Subject: [PATCH 2/7] Update bounds with 'cabal-bounds' & clean warnings --- patch.cabal | 211 ++++++++++++++------------ src/Data/Patch.hs | 2 - src/Data/Patch/IntMap.hs | 1 + src/Data/Patch/Map.hs | 1 + src/Data/Patch/MapWithMove.hs | 1 + src/Data/Patch/MapWithPatchingMove.hs | 1 + 6 files changed, 114 insertions(+), 103 deletions(-) diff --git a/patch.cabal b/patch.cabal index 060a647d..cad6b982 100644 --- a/patch.cabal +++ b/patch.cabal @@ -1,114 +1,123 @@ -Name: patch -Version: 0.0.8.2 -Synopsis: Data structures for describing changes to other data structures. -Description: - Data structures for describing changes to other data structures. - . - In this library, a patch is something which can be applied, analogous to a - function, and which distinguishes returning the argument it was provided from - returning something else. -License: BSD3 -License-file: LICENSE -Author: Ryan Trinkle -Maintainer: maintainer@obsidian.systems -Stability: Experimental -Category: FRP -Build-type: Simple -Cabal-version: >=1.10 -homepage: https://obsidian.systems -bug-reports: https://github.com/reflex-frp/patch/issues +cabal-version: >=1.10 +name: patch +version: 0.0.8.2 +license: BSD3 +license-file: LICENSE +maintainer: maintainer@obsidian.systems +author: Ryan Trinkle +stability: Experimental +tested-with: + ghc ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 || ==9.10.1 + ghcjs ==8.6 || ==8.10 + +homepage: https://obsidian.systems +bug-reports: https://github.com/reflex-frp/patch/issues +synopsis: + Data structures for describing changes to other data structures. + +description: + Data structures for describing changes to other data structures. + . + In this library, a patch is something which can be applied, analogous to a + function, and which distinguishes returning the argument it was provided from + returning something else. + +category: FRP +build-type: Simple extra-source-files: - README.md - ChangeLog.md + README.md + ChangeLog.md -tested-with: - GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 - GHCJS ==8.6 || ==8.10 +source-repository head + type: git + location: https://github.com/reflex-frp/patch flag split-these - description: Use split these/semialign packages - manual: False - default: True + description: Use split these/semialign packages flag hlint - description: Enable hlint test - default: True + description: Enable hlint test library - hs-source-dirs: src - default-language: Haskell2010 - build-depends: base >= 4.9 && <= 4.21 - , constraints-extras >= 0.3 && < 0.5 - , commutative-semigroups >= 0.0 && <= 0.2.0.1 - , containers >= 0.6 && <= 0.7 - , dependent-map >= 0.3 && < 0.5 - , dependent-sum >= 0.6 && < 0.8 - , lens >= 4.7 && <= 5.3.2 - , indexed-traversable >= 0.1 && < 0.2 - , semigroupoids >= 4.0 && < 7 - , transformers >= 0.5.6.0 && < 0.7 - , witherable >= 0.3 && < 0.5 - - if impl(ghc < 8.6) - build-depends: base-orphans >= 0.8 && < 0.9 - - exposed-modules: Data.Functor.Misc - , Data.Monoid.DecidablyEmpty - , Data.Patch - , Data.Patch.Class - , Data.Patch.DMap - , Data.Patch.DMapWithMove - , Data.Patch.IntMap - , Data.Patch.Map - , Data.Patch.MapWithMove - , Data.Patch.MapWithPatchingMove - , Data.Patch.PatchOrReplacement - , Data.Semigroup.Additive - - ghc-options: -Wall -fwarn-redundant-constraints -fwarn-tabs - default-extensions: PolyKinds - - if flag(split-these) - build-depends: these >= 1 && <1.3 - , semialign >=1 && <1.4 - , monoidal-containers >= 0.6 && < 0.7 - else - build-depends: these >= 0.4 && <0.9 - , monoidal-containers == 0.4.0.0 + exposed-modules: + Data.Functor.Misc + Data.Monoid.DecidablyEmpty + Data.Patch + Data.Patch.Class + Data.Patch.DMap + Data.Patch.DMapWithMove + Data.Patch.IntMap + Data.Patch.Map + Data.Patch.MapWithMove + Data.Patch.MapWithPatchingMove + Data.Patch.PatchOrReplacement + Data.Semigroup.Additive + + hs-source-dirs: src + default-language: Haskell2010 + default-extensions: PolyKinds + ghc-options: -Wall -fwarn-redundant-constraints -fwarn-tabs + build-depends: + base >=4.9 && <=4.21, + constraints-extras >=0.3 && <0.5, + commutative-semigroups >=0.0 && <0.3, + containers >=0.6 && <0.8, + dependent-map >=0.3 && <0.5, + dependent-sum >=0.6 && <0.8, + lens >=4.7 && <5.4, + indexed-traversable >=0.1 && <0.2, + semigroupoids >=4.0 && <7, + transformers >=0.5.6.0 && <0.7, + witherable >=0.3 && <0.6 + + if impl(ghc <8.6) + build-depends: base-orphans >=0.8 && <0.10 + + if flag(split-these) + build-depends: + these >=1 && <1.3, + semialign >=1 && <1.4, + monoidal-containers >=0.6 && <0.7 + + else + build-depends: + these >=0.4 && <0.9, + monoidal-containers ==0.4.0.0 test-suite tests - default-language: Haskell2010 - type: exitcode-stdio-1.0 - main-is: tests.hs - hs-source-dirs: test - build-depends: base - , patch - , containers - , hedgehog - , HUnit - if impl(ghcjs) || arch(javascript) - buildable: False + type: exitcode-stdio-1.0 + main-is: tests.hs + hs-source-dirs: test + default-language: Haskell2010 + build-depends: + base, + patch, + containers, + hedgehog <1.6, + HUnit <1.7 + + if (impl(ghcjs >=0) || arch(javascript)) + buildable: False test-suite hlint - -- hlint doesn't support ghc-9.6 yet (as of version 3.5) - if impl(ghc >= 9.6) - buildable: False - default-language: Haskell2010 - type: exitcode-stdio-1.0 - main-is: hlint.hs - hs-source-dirs: test - build-depends: base - , directory - , filepath - , filemanip - if impl(ghc < 9.2) - build-depends: hlint (< 2.1 || >= 2.2.2) && < 3.5 - else - build-depends: hlint >= 3.5 && < 3.6 - - if impl(ghcjs) || arch(javascript) || !flag(hlint) - buildable: False + type: exitcode-stdio-1.0 + main-is: hlint.hs + hs-source-dirs: test + default-language: Haskell2010 + build-depends: + base, + directory, + filepath, + filemanip -source-repository head - type: git - location: https://github.com/reflex-frp/patch + if impl(ghc >=9.6) + buildable: False + + if impl(ghc <9.2) + build-depends: hlint (<2.1 || >=2.2.2) && <3.5 + + else + build-depends: hlint >=3.5 && <3.6 + + if ((impl(ghcjs >=0) || arch(javascript)) || !flag(hlint)) + buildable: False diff --git a/src/Data/Patch.hs b/src/Data/Patch.hs index 71a187d3..2e8a6012 100644 --- a/src/Data/Patch.hs +++ b/src/Data/Patch.hs @@ -14,7 +14,6 @@ module Data.Patch ) where import Data.Semigroup.Commutative -import Control.Applicative (liftA2) import Data.Functor.Const (Const (..)) import Data.Functor.Identity import Data.Map.Monoidal (MonoidalMap) @@ -24,7 +23,6 @@ import Data.Semigroup (Semigroup (..)) #endif import GHC.Generics -import qualified Data.Semigroup.Additive as X import Data.Patch.Class as X import Data.Patch.DMap as X hiding (getDeletions) import Data.Patch.DMapWithMove as X diff --git a/src/Data/Patch/IntMap.hs b/src/Data/Patch/IntMap.hs index 9866596f..f483f7fa 100644 --- a/src/Data/Patch/IntMap.hs +++ b/src/Data/Patch/IntMap.hs @@ -6,6 +6,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-| Description: Module containing 'PatchIntMap', a 'Patch' for 'IntMap'. diff --git a/src/Data/Patch/Map.hs b/src/Data/Patch/Map.hs index c9712551..c240460b 100644 --- a/src/Data/Patch/Map.hs +++ b/src/Data/Patch/Map.hs @@ -7,6 +7,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-| Description: A basic 'Patch' on 'Map' diff --git a/src/Data/Patch/MapWithMove.hs b/src/Data/Patch/MapWithMove.hs index d0c834e0..5a9aa81c 100644 --- a/src/Data/Patch/MapWithMove.hs +++ b/src/Data/Patch/MapWithMove.hs @@ -12,6 +12,7 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPatterns #-} {-| diff --git a/src/Data/Patch/MapWithPatchingMove.hs b/src/Data/Patch/MapWithPatchingMove.hs index 78be3058..62d1db2b 100644 --- a/src/Data/Patch/MapWithPatchingMove.hs +++ b/src/Data/Patch/MapWithPatchingMove.hs @@ -9,6 +9,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-| From 6cf8b9565d068b5c2f173a3ca0151a9d58f9d13c Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Wed, 7 Aug 2024 06:26:17 +0400 Subject: [PATCH 3/7] Expand CI --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 31bffbfe..d01883ab 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.5', '9.6.1'] + ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.5', '9.6.1', '9.8.2', '9.10.1'] os: ['ubuntu-latest', 'macos-latest'] runs-on: ${{ matrix.os }} From 98f3106e237f36ac4432c9684428968ab2c63cfb Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Wed, 7 Aug 2024 06:52:21 +0400 Subject: [PATCH 4/7] Preserve backwards compatibility --- src/Data/Patch.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Data/Patch.hs b/src/Data/Patch.hs index 2e8a6012..0f5cef61 100644 --- a/src/Data/Patch.hs +++ b/src/Data/Patch.hs @@ -18,10 +18,15 @@ import Data.Functor.Const (Const (..)) import Data.Functor.Identity import Data.Map.Monoidal (MonoidalMap) import Data.Proxy +import GHC.Generics + +#if !MIN_VERSION_base(4,18,0) +import Control.Applicative (liftA2) +#endif + #if !MIN_VERSION_base(4,11,0) import Data.Semigroup (Semigroup (..)) #endif -import GHC.Generics import Data.Patch.Class as X import Data.Patch.DMap as X hiding (getDeletions) From 944bcdcb841bad141d703ecc2e8fb8116f207d6b Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Wed, 7 Aug 2024 06:56:00 +0400 Subject: [PATCH 5/7] Ignore 'cabal.project.local' --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0cab7d45..29495b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ dist cabal.sandbox.config +cabal.project.local .cabal-sandbox/ dist-* cabal-dev From 2170c364450d5827a21dbcd817131d5def6e4767 Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Wed, 7 Aug 2024 07:24:20 +0400 Subject: [PATCH 6/7] Tested with ghc-9.8.2 --- patch.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch.cabal b/patch.cabal index cad6b982..03c4fe85 100644 --- a/patch.cabal +++ b/patch.cabal @@ -7,7 +7,7 @@ maintainer: maintainer@obsidian.systems author: Ryan Trinkle stability: Experimental tested-with: - ghc ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 || ==9.10.1 + ghc ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1 || ==9.8.2 || ==9.10.1 ghcjs ==8.6 || ==8.10 homepage: https://obsidian.systems From a58e289885cf9baaf3a4c6e4aa545d9f78d7a8fb Mon Sep 17 00:00:00 2001 From: ymeister <47071325+ymeister@users.noreply.github.com> Date: Mon, 9 Sep 2024 01:24:30 +0400 Subject: [PATCH 7/7] Remove 'x86_64-darwin' from CI --- release.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.nix b/release.nix index b0fc8466..c2ae8fd1 100644 --- a/release.nix +++ b/release.nix @@ -4,7 +4,7 @@ let native-reflex-platform = reflex-platform-fun { __useNewerCompiler = true; }; inherit (native-reflex-platform.nixpkgs) lib; - systems = ["x86_64-linux" "x86_64-darwin"]; + systems = ["x86_64-linux"]; perPlatform = lib.genAttrs systems (system: let reflex-platform = reflex-platform-fun { inherit system; __useNewerCompiler = true; };