diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e454c12..7cdd512 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - ghc: ['9.0.2', '9.2.7'] + ghc: ['9.0.2', '9.2.7', '9.4.4'] cabal: ['3.8.1.0', '3.6.2.0', '3.4.1.0'] os: ['ubuntu-latest', 'macos-latest'] exclude: @@ -53,16 +53,3 @@ jobs: - name: Test on HEAD dependencies run: cabal test --index-state HEAD - # strategy: - # matrix: - # ghc: ['90', '92'] - # os: ['ubuntu-latest', 'macos-latest'] - # runs-on: ${{ matrix.os }} - # name: Build with GHC ${{ matrix.ghc }} on ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v3 - # - uses: cachix/install-nix-action@v18 - # with: - # nix_path: nixpkgs=channel:nixos-22.11 - # - name: Build - # run: nix build -L .#crem.ghc${{ matrix.ghc }} diff --git a/examples/Crem/Example/LockDoor.hs b/examples/Crem/Example/LockDoor.hs index 6f1a8d2..2808445 100644 --- a/examples/Crem/Example/LockDoor.hs +++ b/examples/Crem/Example/LockDoor.hs @@ -6,6 +6,8 @@ {-# OPTIONS_GHC -Wno-all-missed-specialisations #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-deriving-strategies {-# OPTIONS_GHC -Wno-missing-deriving-strategies #-} +-- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} diff --git a/examples/Crem/Example/RiskManager/Aggregate.hs b/examples/Crem/Example/RiskManager/Aggregate.hs index 3caa990..0e938a8 100644 --- a/examples/Crem/Example/RiskManager/Aggregate.hs +++ b/examples/Crem/Example/RiskManager/Aggregate.hs @@ -4,6 +4,8 @@ {-# LANGUAGE UndecidableInstances #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-deriving-strategies {-# OPTIONS_GHC -Wno-missing-deriving-strategies #-} +-- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} diff --git a/examples/Crem/Example/RiskManager/Projection.hs b/examples/Crem/Example/RiskManager/Projection.hs index 839f476..9944e42 100644 --- a/examples/Crem/Example/RiskManager/Projection.hs +++ b/examples/Crem/Example/RiskManager/Projection.hs @@ -6,6 +6,8 @@ {-# LANGUAGE UndecidableInstances #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-deriving-strategies {-# OPTIONS_GHC -Wno-missing-deriving-strategies #-} +-- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} diff --git a/examples/Crem/Example/TheHobbit.hs b/examples/Crem/Example/TheHobbit.hs index 277d089..5345255 100644 --- a/examples/Crem/Example/TheHobbit.hs +++ b/examples/Crem/Example/TheHobbit.hs @@ -5,6 +5,8 @@ {-# LANGUAGE UndecidableInstances #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-deriving-strategies {-# OPTIONS_GHC -Wno-missing-deriving-strategies #-} +-- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} diff --git a/examples/Crem/Example/TwoSwitchesGate.lhs b/examples/Crem/Example/TwoSwitchesGate.lhs index 1211e8d..b3a5171 100644 --- a/examples/Crem/Example/TwoSwitchesGate.lhs +++ b/examples/Crem/Example/TwoSwitchesGate.lhs @@ -4,6 +4,8 @@ > {-# LANGUAGE UndecidableInstances #-} > -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-deriving-strategies > {-# OPTIONS_GHC -Wno-missing-deriving-strategies #-} +> -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +> {-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} > -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns > {-# OPTIONS_GHC -Wno-unused-type-patterns #-} > diff --git a/examples/Crem/Example/Uno.hs b/examples/Crem/Example/Uno.hs index 355c99d..cc4a5a0 100644 --- a/examples/Crem/Example/Uno.hs +++ b/examples/Crem/Example/Uno.hs @@ -9,6 +9,8 @@ {-# OPTIONS_GHC -Wno-missing-deriving-strategies #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunrecognised-pragmas {-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} +-- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} diff --git a/src/Crem/Topology.hs b/src/Crem/Topology.hs index d70880a..eece96e 100644 --- a/src/Crem/Topology.hs +++ b/src/Crem/Topology.hs @@ -4,6 +4,8 @@ {-# LANGUAGE UndecidableInstances #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wredundant-constraints {-# OPTIONS_GHC -Wno-redundant-constraints #-} +-- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors +{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-} -- https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} @@ -50,17 +52,17 @@ data AllowTransition (topology :: Topology vertex) (initial :: vertex) (final :: AllowIdentityEdge :: AllowTransition topology a a -- | If @a@ is the start and @b@ is the end of the first edge, -- then @map@ contains an edge from @a@ to @b@ - AllowFirstEdge :: AllowTransition ('Topology ('(a, b : l1) : l2)) a b + AllowFirstEdge :: AllowTransition ('Topology ('(a, b ': l1) ': l2)) a b -- | If we know that we have an edge from @a@ to @b@ in a topology, -- then we also have an edge from @a@ to @b@ if we add another edge out of @a@ AllowAddingEdge - :: AllowTransition ('Topology ('(a, l1) : l2)) a b - -> AllowTransition ('Topology ('(a, x : l1) : l2)) a b + :: AllowTransition ('Topology ('(a, l1) ': l2)) a b + -> AllowTransition ('Topology ('(a, x ': l1) ': l2)) a b -- | If we know that we have an edge from @a@ to @b@ in @map@, -- then we also have an edge from @a@ to @b@ if we add another vertex AllowAddingVertex :: AllowTransition ('Topology map) a b - -> AllowTransition ('Topology (x : map)) a b + -> AllowTransition ('Topology (x ': map)) a b -- | The `AllowedTransition` type class enables to automatically perform proof search -- for a `AllowTransition` term. @@ -68,14 +70,14 @@ data AllowTransition (topology :: Topology vertex) (initial :: vertex) (final :: class AllowedTransition (topology :: Topology vertex) (initial :: vertex) (final :: vertex) where allowsTransition :: AllowTransition topology initial final -instance {-# INCOHERENT #-} AllowedTransition ('Topology ('(a, b : l1) : l2)) a b where +instance {-# INCOHERENT #-} AllowedTransition ('Topology ('(a, b ': l1) ': l2)) a b where allowsTransition = AllowFirstEdge -instance {-# INCOHERENT #-} AllowedTransition ('Topology ('(a, l1) : l2)) a b => AllowedTransition ('Topology ('(a, x : l1) : l2)) a b where +instance {-# INCOHERENT #-} AllowedTransition ('Topology ('(a, l1) ': l2)) a b => AllowedTransition ('Topology ('(a, x ': l1) ': l2)) a b where allowsTransition = - AllowAddingEdge (allowsTransition :: AllowTransition ('Topology ('(a, l1) : l2)) a b) + AllowAddingEdge (allowsTransition :: AllowTransition ('Topology ('(a, l1) ': l2)) a b) -instance {-# INCOHERENT #-} AllowedTransition ('Topology map) a b => AllowedTransition ('Topology (x : map)) a b where +instance {-# INCOHERENT #-} AllowedTransition ('Topology map) a b => AllowedTransition ('Topology (x ': map)) a b where allowsTransition = AllowAddingVertex (allowsTransition :: AllowTransition ('Topology map) a b)