Skip to content
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
1 change: 0 additions & 1 deletion algebraic-graphs/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
{-# OPTIONS_GHC -Wno-unsafe #-}
{-# OPTIONS_GHC -fplugin=NoRecursion #-}

module Main (main) where

Expand Down
39 changes: 25 additions & 14 deletions algebraic-graphs/algebraic-graph-duoids.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ source-repository head
location: https://github.com/sellout/duoids.git
subdir: algebraic-graphs

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
manual: False

custom-setup
setup-depends:
-- TODO: Due to haskell/cabal#3751, `Cabal` has to be specified even though
Expand All @@ -58,7 +47,26 @@ custom-setup
Cabal >= 3.0 && < 99,
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
cabal-doctest ^>= {1.0.0},
no-recursion ^>= {0.2.0, 0.3.0},

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
-- Because disabling this flag won’t help the solver.
manual: True

flag verify-no-recursion
description:
Compile with "NoRecursion" enabled. This is intended for developers of this
package.
default: False
-- Because disabling this flag won’t help the solver.
manual: True

-- This mimics the GHC2024 extension
-- (https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html?highlight=doandifthenelse#extension-GHC2024),
Expand All @@ -83,7 +91,6 @@ common defaults
import: GHC2024
build-depends:
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-Weverything
-- This one just reports unfixable things, AFAICT.
Expand All @@ -93,7 +100,6 @@ common defaults
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
-Wno-unsafe
-fplugin=NoRecursion
if impl(ghc >= 9.8.1)
ghc-options:
-- Inference good.
Expand Down Expand Up @@ -121,6 +127,11 @@ common defaults
NoTypeApplications
if flag(noisy-deprecations)
cpp-options: -DSELLOUT_NOISY_DEPRECATIONS
if flag(verify-no-recursion)
build-depends:
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-fplugin=NoRecursion

library
import: defaults
Expand Down
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ max-backjumps: -1
minimize-conflict-set: true
reorder-goals: true

flags:
-- Ensure development of this project always uses @NoRecursion@, even if it
-- causes the solver to fail.
+verify-no-recursion

program-options
ghc-options:
-Werror
Expand Down
1 change: 0 additions & 1 deletion core/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
{-# OPTIONS_GHC -Wno-unsafe #-}
{-# OPTIONS_GHC -fplugin=NoRecursion #-}

module Main (main) where

Expand Down
42 changes: 27 additions & 15 deletions core/duoids.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ source-repository head
location: https://github.com/sellout/duoids.git
subdir: core

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
manual: False

custom-setup
setup-depends:
-- TODO: Due to haskell/cabal#3751, `Cabal` has to be specified even though
Expand All @@ -59,7 +48,26 @@ custom-setup
Cabal >= 3.0 && < 99,
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
cabal-doctest ^>= {1.0.0},
no-recursion ^>= {0.2.0, 0.3.0},

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
-- Because disabling this flag won’t help the solver.
manual: True

flag verify-no-recursion
description:
Compile with "NoRecursion" enabled. This is intended for developers of this
package.
default: False
-- Because disabling this flag won’t help the solver.
manual: True

-- This mimics the GHC2024 extension
-- (https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html?highlight=doandifthenelse#extension-GHC2024),
Expand All @@ -84,7 +92,6 @@ common defaults
import: GHC2024
build-depends:
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-Weverything
-- This one just reports unfixable things, AFAICT.
Expand All @@ -94,7 +101,6 @@ common defaults
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
-Wno-unsafe
-fplugin=NoRecursion
if impl(ghc >= 9.8.1)
ghc-options:
-- Inference good.
Expand All @@ -121,7 +127,13 @@ common defaults
NoStarIsType
NoTypeApplications
if flag(noisy-deprecations)
cpp-options: -DSELLOUT_NOISY_DEPRECATIONS
cpp-options:
-DSELLOUT_NOISY_DEPRECATIONS
if flag(verify-no-recursion)
build-depends:
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-fplugin=NoRecursion

library
import: defaults
Expand Down
1 change: 0 additions & 1 deletion hedgehog/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
{-# OPTIONS_GHC -Wno-unsafe #-}
{-# OPTIONS_GHC -fplugin=NoRecursion #-}

module Main (main) where

Expand Down
42 changes: 27 additions & 15 deletions hedgehog/duoids-hedgehog.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ source-repository head
location: https://github.com/sellout/duoids.git
subdir: hedgehog

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
manual: False

custom-setup
setup-depends:
-- TODO: Due to haskell/cabal#3751, `Cabal` has to be specified even though
Expand All @@ -58,7 +47,26 @@ custom-setup
Cabal >= 3.0 && < 99,
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
cabal-doctest ^>= {1.0.0},
no-recursion ^>= {0.2.0, 0.3.0},

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
-- Because disabling this flag won’t help the solver.
manual: True

flag verify-no-recursion
description:
Compile with "NoRecursion" enabled. This is intended for developers of this
package.
default: False
-- Because disabling this flag won’t help the solver.
manual: True

-- This mimics the GHC2024 extension
-- (https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html?highlight=doandifthenelse#extension-GHC2024),
Expand All @@ -83,7 +91,6 @@ common defaults
import: GHC2024
build-depends:
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-Weverything
-- This one just reports unfixable things, AFAICT.
Expand All @@ -93,7 +100,6 @@ common defaults
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
-Wno-unsafe
-fplugin=NoRecursion
if impl(ghc >= 9.8.1)
ghc-options:
-- Inference good.
Expand All @@ -120,7 +126,13 @@ common defaults
NoStarIsType
NoTypeApplications
if flag(noisy-deprecations)
cpp-options: -DSELLOUT_NOISY_DEPRECATIONS
cpp-options:
-DSELLOUT_NOISY_DEPRECATIONS
if flag(verify-no-recursion)
build-depends:
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-fplugin=NoRecursion

library
import: defaults
Expand Down
1 change: 0 additions & 1 deletion transformers/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
{-# OPTIONS_GHC -Wno-unsafe #-}
{-# OPTIONS_GHC -fplugin=NoRecursion #-}

module Main (main) where

Expand Down
42 changes: 27 additions & 15 deletions transformers/duoidal-transformers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ source-repository head
location: https://github.com/sellout/duoids.git
subdir: transformers

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
manual: False

custom-setup
setup-depends:
-- TODO: Due to haskell/cabal#3751, `Cabal` has to be specified even though
Expand All @@ -58,7 +47,26 @@ custom-setup
Cabal >= 3.0 && < 99,
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
cabal-doctest ^>= {1.0.0},
no-recursion ^>= {0.2.0, 0.3.0},

flag noisy-deprecations
description:
Prior to GHC 9.10, the @DEPRECATED@ pragma can’t distinguish between terms
and types. Consenquently, you can get spurious warnings when there’s a name
collision and the name in the other namespace is deprecated. Or you can
choose to not get those warnings, at the risk of not being warned when
there’s a name collision and the namespace you’re referencing is the one
that’s deprecated.
default: True
-- Because disabling this flag won’t help the solver.
manual: True

flag verify-no-recursion
description:
Compile with "NoRecursion" enabled. This is intended for developers of this
package.
default: False
-- Because disabling this flag won’t help the solver.
manual: True

-- This mimics the GHC2024 extension
-- (https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html?highlight=doandifthenelse#extension-GHC2024),
Expand All @@ -83,7 +91,6 @@ common defaults
import: GHC2024
build-depends:
base ^>= {4.18.0, 4.19.0, 4.20.0, 4.21.0},
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-Weverything
-- This one just reports unfixable things, AFAICT.
Expand All @@ -93,7 +100,6 @@ common defaults
-- Warns even when `Unsafe` is explicit, not inferred. See
-- https://gitlab.haskell.org/ghc/ghc/-/issues/16689
-Wno-unsafe
-fplugin=NoRecursion
if impl(ghc >= 9.8.1)
ghc-options:
-- Inference good.
Expand All @@ -120,7 +126,13 @@ common defaults
NoStarIsType
NoTypeApplications
if flag(noisy-deprecations)
cpp-options: -DSELLOUT_NOISY_DEPRECATIONS
cpp-options:
-DSELLOUT_NOISY_DEPRECATIONS
if flag(verify-no-recursion)
build-depends:
no-recursion ^>= {0.2.0, 0.3.0},
ghc-options:
-fplugin=NoRecursion

library
import: defaults
Expand Down