Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with ghc(js) 9.8.2 + 9.10.1 #56

Merged
merged 7 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist
cabal.sandbox.config
cabal.project.local
.cabal-sandbox/
dist-*
cabal-dev
Expand Down
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
packages: .

if arch(javascript)
extra-packages: ghci
ymeister marked this conversation as resolved.
Show resolved Hide resolved
211 changes: 110 additions & 101 deletions patch.cabal
Original file line number Diff line number Diff line change
@@ -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.8.2 || ==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.19
, constraints-extras >= 0.3 && < 0.5
, commutative-semigroups >= 0.0 && < 0.2
, containers >= 0.6 && < 0.7
, dependent-map >= 0.3 && < 0.5
, dependent-sum >= 0.6 && < 0.8
, lens >= 4.7 && < 5.3
, 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)
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) || !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
2 changes: 1 addition & 1 deletion release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bummer, but I think it is fine for now because https://ci.obsidian.systems/ is in maintenance mode, and other things (like reflex itself) will get this.


perPlatform = lib.genAttrs systems (system: let
reflex-platform = reflex-platform-fun { inherit system; __useNewerCompiler = true; };
Expand Down
9 changes: 6 additions & 3 deletions src/Data/Patch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ 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)
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 qualified Data.Semigroup.Additive as X
ymeister marked this conversation as resolved.
Show resolved Hide resolved
import Data.Patch.Class as X
import Data.Patch.DMap as X hiding (getDeletions)
import Data.Patch.DMapWithMove as X
Expand Down
1 change: 1 addition & 0 deletions src/Data/Patch/IntMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

{-|
Description: Module containing 'PatchIntMap', a 'Patch' for 'IntMap'.
Expand Down
1 change: 1 addition & 0 deletions src/Data/Patch/Map.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

{-|
Description: A basic 'Patch' on 'Map'
Expand Down
1 change: 1 addition & 0 deletions src/Data/Patch/MapWithMove.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}

{-|
Expand Down
1 change: 1 addition & 0 deletions src/Data/Patch/MapWithPatchingMove.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

{-|
Expand Down Expand Up @@ -230,7 +231,7 @@
Just (from, to)
reverseMapping = Map.fromList $ catMaybes $ zipWith f unsorted sorted
g (to, _) (from, _) = if to == from then Nothing else
let Just movingTo = Map.lookup from reverseMapping

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.4.5 on ubuntu-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10.1 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.4.5 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.6.1 on macos-latest

Pattern match(es) are non-exhaustive

Check warning on line 234 in src/Data/Patch/MapWithPatchingMove.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8.2 on macos-latest

Pattern match(es) are non-exhaustive
in Just (to, NodeInfo (From_Move from mempty) $ Just movingTo)

-- | Create a 'PatchMapWithPatchingMove' that, if applied to the first 'Map' provided,
Expand Down
Loading