Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/head.hackage
  • RyanGlScott/head.hackage
  • vaibhavsagar/head.hackage
  • phadej/head.hackage
  • jessoune29/head.hackage
  • alanz/head.hackage
  • clint/head.hackage
  • osa1/head.hackage
  • supersven/head.hackage
  • fendor/head.hackage
  • hsyl20/head.hackage
  • adinapoli/head.hackage
  • alexbiehl/head.hackage
  • mimi.vx/head.hackage
  • Kleidukos/head.hackage
  • wz1000/head.hackage
  • alinab/head.hackage
  • teo/head.hackage
  • duog/head.hackage
  • sheaf/head.hackage
  • expipiplus1/head.hackage
  • drsooch/head.hackage
  • tobias/head.hackage
  • brandonchinn178/head.hackage
  • mpickering/hooks-setup-testing
  • Mikolaj/head.hackage
  • RandomMoonwalker/head.hackage
  • facundominguez/head.hackage
  • trac-fizzixnerd/head.hackage
  • neil.mayhew/head.hackage
  • jappeace/head.hackage
31 results
Show changes
Commits on Source (118)
Showing
with 1881 additions and 152 deletions
patches/* -text
......@@ -33,8 +33,8 @@
#
variables:
# Which nixos/nix Docker image tag to use
DOCKER_TAG: "2.13.1"
# Which lix-project/lix Docker image tag to use
DOCKER_TAG: "2.93.3"
# Default this to ghc/ghc> to make it more convenient to run from the web
# interface.
......
......@@ -10,6 +10,3 @@
[submodule "tests/containers"]
path = tests/containers
url = https://github.com/haskell/containers.git
[submodule "tests/liquidhaskell"]
path = tests/liquidhaskell
url = https://github.com/ucsd-progsys/liquidhaskell.git
......@@ -10,7 +10,7 @@ existing Hackage package(s).
you submit a PR).
- The patches SHOULD work with at least GHC HEAD and a set of recent stable
released GHC versions (currently this means with GHC 9.4, 9.6, 9.8, and 9.9).
released GHC versions (currently this means with GHC 9.10, 9.12, 9.14 and 9.15).
- The patches SHOULD ideally result in the same code being compiled,
as one of the main purposes of these patches is to make regression
......@@ -22,6 +22,12 @@ existing Hackage package(s).
This repo contains `<pkg-id>.patch` files in the
[`patches/`](./patches/) folder (where `<pkg-id>` refers to a specific
release of a package, e.g. `lens-4.15.3`).
Adding a patch forces the system to use that specific version,
so empty patch files may exist to force the system to use that a
newer version, instead of a previous patch if available.
For example consider a patched `th-abstraction-0.5.0`, and an empty patch `th-abstraction-0.6.0`,
if we were to remove the empty patch, `0.6.0`, certain libraries such
as `generics-sop` fail to build, because it's forced to use `0.5.0`.
Once merged to `master`, all package releases whose `<pkg-id>` is
mentioned will enter the *HEAD.hackage* package index; if there is a
......@@ -67,7 +73,7 @@ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org
```
Also see
https://cabal.readthedocs.io/en/latest/cabal-project.html#cfg-field-active-repositories.
https://cabal.readthedocs.io/en/3.12/cabal-project-description-file.html#cfg-field-active-repositories.
`HEAD.hackage` doesn't bump the bounds of boot packages + certain other packages to avoid the busywork of bumping them. When using `HEAD.hackage`, you should use `--allow-newer` for these packages. The full list is [here](https://gitlab.haskell.org/ghc/head.hackage/-/blob/90570e1c4606c1d7d3d41797ec1b32d1b984067b/ci/MakeConstraints.hs#L40-49).
......@@ -144,6 +150,17 @@ The `scripts/patch-tool` script is a tool for conveniently authoring and updatin
1. `scripts/patch-tool update-patches`
1. Commit the patch
When contributing a patch, one needs to be mindful of [Hackage revisions].
head.hackage doesn't combine patches with the revisions of a package. Instead,
a patch is applied on the unrevised package (also called revision 0). This
implies that when contributing patches, it might be necessary to additionally
include the changes that are already in some revision. Moreover, this also
implies that if a patch only contains changes that are already present in
revisions, then contributing the patch to head.hackage is useless as the changes
are already available for building.
[Hackage revisions]: https://github.com/haskell-infra/hackage-trustees/blob/master/revisions-information.md
### GitLab CI
GHC's GitLab instance uses GitLab CI and the `head-hackage-ci` tool (contained
......
......@@ -47,7 +47,9 @@ allowNewerPkgs = S.fromList
, "Cabal"
, "containers"
, "deepseq"
, "text" ] `S.union` bootPkgs
, "text"
, "ghc-boot"
, "ghc-boot-th" ] `S.union` bootPkgs
constraints :: [String] -> Doc
constraints constraints =
......
......@@ -3,7 +3,7 @@
-- ghc/ghc#23048.
index-state:
hackage.haskell.org 2024-02-10T23:09:00Z,
hackage.haskell.org 2025-05-11T00:00:00Z,
head.hackage HEAD
constraints: th-abstraction >= 0.4
......
......@@ -88,24 +88,34 @@ commit="$(ghc_commit)"
arch="$(ghc_arch)"
echo "Found GHC $version, commit $commit."
case $version in
9.4.*)
9.10.*)
# package ticket
broken linear-generics 22546
broken liquidhaskell-boot 350
# singletons-base only supports the latest ghc
broken singletons-base 00000
;;
9.6.*)
9.12.*)
# package ticket
broken liquidhaskell-boot 350
;;
9.8.*)
9.14.*)
# package ticket
broken liquidhaskell-boot 350
broken ghcide 00000
broken Agda 26154
# broken until strict-containers is updated to work with the new containers
broken strict-containers 00000
;;
9.9.*)
9.15.*)
# package ticket
broken ghcide 00000
broken Agda 26154
# broken until strict-containers is updated to work with the new containers
broken strict-containers 00000
broken linear-generics 26332
broken singletons 26331
;;
*)
......@@ -135,19 +145,20 @@ esac
#
# These are packages which we don't have patches for but want to test anyways.
extra_package lens 5.2.3
extra_package generic-lens 2.2.2.0
extra_package optics 0.4.2.1
extra_package aeson 2.2.1.0
extra_package aeson 2.2.3.0
extra_package criterion 1.6.3.0
extra_package scotty 0.21
extra_package generic-lens 2.2.2.0
extra_package microstache 1.0.2.3
extra_package singletons-base 3.1.1
extra_package singletons-base 3.5
extra_package servant 0.20.1
extra_package hgmp 0.1.2.1
extra_package Agda 2.6.4.1
extra_package Agda 2.7.0.1
extra_package mmark 0.0.7.6
extra_package doctest 0.22.2
extra_package tasty 1.5
extra_package doctest 0.24.0
extra_package tasty 1.5.3
extra_package pandoc 3.1.11.1
extra_package servant-conduit 0.16
extra_package servant-machines 0.16
......@@ -156,8 +167,8 @@ extra_package futhark 0.25.13
extra_package generic-random 1.5.0.1
extra_package lame 0.2.2
extra_package inspection-testing 0.5.0.3
extra_package ghcide 2.6.0.0
extra_package ghc-typelits-extra 0.4.6
extra_package ghcide 2.9.0.0
extra_package ghc-typelits-extra 0.4.7
# This package is affected by https://gitlab.haskell.org/ghc/ghc/-/issues/22912
extra_package vector-space 0.16
......@@ -216,35 +227,9 @@ case "$BUILD_MODE" in
test_package all "$(pwd)/../tests/text"
test_package bytestring-tests "$(pwd)/../tests/bytestring"
test_package all "$(pwd)/../tests/containers/containers-tests"
case $version in
9.4.*)
;;
9.6.*)
;;
9.8.*)
;;
9.9.*)
test_package liquidhaskell-boot "$(pwd)/../tests/liquidhaskell/liquidhaskell-boot"
;;
*)
;;
esac
;;
COMPAT)
test_package system-test "$(pwd)/../tests/ghc-debug/**/*.cabal"
test_package ghc-tests "$(pwd)/../tests/ghc-tests"
case $version in
9.4.*)
;;
9.6.*)
;;
9.8.*)
;;
9.9.*)
test_package liquidhaskell-boot "$(pwd)/../tests/liquidhaskell/liquidhaskell-boot"
;;
*)
;;
esac
;;
esac
......@@ -2,25 +2,7 @@
with nixpkgs;
let
haskellPackages_ = nixpkgs.haskell.packages.ghc963.override {
all-cabal-hashes = sources.all-cabal-hashes.outPath;
overrides = self: super: {
mkDerivation = args: super.mkDerivation (args // {
enableLibraryProfiling = false;
doCheck = false;
doHoogle = false;
doHaddock = false;
});
};
};
haskellPackages = haskellPackages_.extend (self: super: {
# This is marked broken in nixpkgs, but seems to work fine.
cabal-plan = self.callHackage "cabal-plan" "0.7.3.0" {};
# The easiest fix for an incorrect override in nixpkgs (https://github.com/NixOS/nixpkgs/issues/260013)
tls = self.callHackage "tls" "1.6.0" {};
});
haskellPackages = nixpkgs.haskellPackages;
hackage-repo-tool =
let src = sources.hackage-security.outPath;
......
......@@ -15,41 +15,84 @@ ARCH="$(uname -m)"
# `needs` field in ghc/ghc .gitlab-ci.yml to avoid triggering the downstream job
# too early.
case $ARCH in
aarch64)
if [ -n "$NIGHTLY" ]; then
BINDIST_NAME="ghc-aarch64-linux-deb10-validate.tar.xz"
JOB_NAME="nightly-aarch64-linux-deb10-validate"
elif [ "$RELEASE_JOB" == "yes" ]; then
BINDIST_NAME="ghc-aarch64-linux-deb10-release+no_split_sections.tar.xz"
JOB_NAME="release-aarch64-linux-deb10-release+no_split_sections"
else
BINDIST_NAME="ghc-aarch64-linux-deb10-validate.tar.xz"
JOB_NAME="aarch64-linux-deb10-validate"
fi
;;
*)
if [ -n "$SLOW_VALIDATE" ]; then
BINDIST_NAME="ghc-x86_64-linux-deb10-numa-slow-validate.tar.xz"
if [ -n "$NIGHTLY" ]; then
JOB_NAME="nightly-x86_64-linux-deb10-numa-slow-validate"
elif [ "$RELEASE_JOB" == "yes" ]; then
echo "No slow validate build in release job"
exit 2
else
JOB_NAME="x86_64-linux-deb10-numa-slow-validate"
fi
else
BINDIST_NAME="ghc-x86_64-linux-fedora33-release.tar.xz"
if [ -n "$NIGHTLY" ]; then
JOB_NAME="nightly-x86_64-linux-fedora33-release"
elif [ "$RELEASE_JOB" == "yes" ]; then
JOB_NAME="release-x86_64-linux-fedora33-release"
else
JOB_NAME="x86_64-linux-fedora33-release"
fi
fi
;;
# Before the update to deb12, we use the deb10 bindists
case $UPSTREAM_BRANCH_NAME in
ghc-9.10)
case $ARCH in
aarch64)
if [ -n "$NIGHTLY" ]; then
BINDIST_NAME="ghc-aarch64-linux-deb10-validate.tar.xz"
JOB_NAME="nightly-aarch64-linux-deb10-validate"
elif [ "$RELEASE_JOB" == "yes" ]; then
BINDIST_NAME="ghc-aarch64-linux-deb10-release+no_split_sections.tar.xz"
JOB_NAME="release-aarch64-linux-deb10-release+no_split_sections"
else
BINDIST_NAME="ghc-aarch64-linux-deb10-validate.tar.xz"
JOB_NAME="aarch64-linux-deb10-validate"
fi
;;
*)
if [ -n "$SLOW_VALIDATE" ]; then
BINDIST_NAME="ghc-x86_64-linux-deb10-numa-slow-validate.tar.xz"
if [ -n "$NIGHTLY" ]; then
JOB_NAME="nightly-x86_64-linux-deb10-numa-slow-validate"
elif [ "$RELEASE_JOB" == "yes" ]; then
echo "No slow validate build in release job"
exit 2
else
JOB_NAME="x86_64-linux-deb10-numa-slow-validate"
fi
else
BINDIST_NAME="ghc-x86_64-linux-fedora33-release.tar.xz"
if [ -n "$NIGHTLY" ]; then
JOB_NAME="nightly-x86_64-linux-fedora33-release"
elif [ "$RELEASE_JOB" == "yes" ]; then
JOB_NAME="release-x86_64-linux-fedora33-release"
else
JOB_NAME="x86_64-linux-fedora33-release"
fi
fi
;;
esac
;;
*) # Post update to use deb12
case $ARCH in
aarch64)
if [ -n "$NIGHTLY" ]; then
BINDIST_NAME="ghc-aarch64-linux-deb12-validate.tar.xz"
JOB_NAME="nightly-aarch64-linux-deb12-validate"
elif [ "$RELEASE_JOB" == "yes" ]; then
BINDIST_NAME="ghc-aarch64-linux-deb12-release+no_split_sections.tar.xz"
JOB_NAME="release-aarch64-linux-deb12-release+no_split_sections"
else
BINDIST_NAME="ghc-aarch64-linux-deb12-validate.tar.xz"
JOB_NAME="aarch64-linux-deb12-validate"
fi
;;
*)
if [ -n "$SLOW_VALIDATE" ]; then
BINDIST_NAME="ghc-x86_64-linux-deb12-numa-slow-validate.tar.xz"
if [ -n "$NIGHTLY" ]; then
JOB_NAME="nightly-x86_64-linux-deb12-numa-slow-validate"
elif [ "$RELEASE_JOB" == "yes" ]; then
echo "No slow validate build in release job"
exit 2
else
JOB_NAME="x86_64-linux-deb12-numa-slow-validate"
fi
else
BINDIST_NAME="ghc-x86_64-linux-fedora33-release.tar.xz"
if [ -n "$NIGHTLY" ]; then
JOB_NAME="nightly-x86_64-linux-fedora33-release"
elif [ "$RELEASE_JOB" == "yes" ]; then
JOB_NAME="release-x86_64-linux-fedora33-release"
else
JOB_NAME="x86_64-linux-fedora33-release"
fi
fi
;;
esac
;;
esac
>&2 echo "BINDIST_NAME=${BINDIST_NAME}"
......
......@@ -6,7 +6,7 @@
tags:
- x86_64-linux
image: "nixos/nix:$DOCKER_TAG"
image: "ghcr.io/lix-project/lix:$DOCKER_TAG"
script:
- source ci/setup-nix-environment.sh
......@@ -25,8 +25,8 @@
- run-ci
after_script:
- source ci/setup-nix-environment.sh
- |
nix --quiet develop -f ci -c \
tar -cJf results.tar.xz -C ci/run \
results.json logs compiler-info eventlogs
......
......@@ -13,7 +13,7 @@
# [1]: https://gitlab.haskell.org/ghc/head.hackage/-/settings/ci_cd
# [2]: https://gitlab.haskell.org/ghc/head.hackage/-/settings/access_tokens
update-branch:
image: "nixos/nix:$DOCKER_TAG"
image: "ghcr.io/lix-project/lix:$DOCKER_TAG"
tags:
- x86_64-linux
script:
......
......@@ -10,7 +10,7 @@ update-repo:
tags:
- x86_64-linux
image: "nixos/nix:$DOCKER_TAG"
image: "ghcr.io/lix-project/lix:$DOCKER_TAG"
variables:
KEYS_TARBALL: https://downloads.haskell.org/ghc/head.hackage-keys.tar.enc
......
......@@ -14,7 +14,7 @@ stages:
extends: .run-ci
parallel:
matrix:
- UPSTREAM_BRANCH_NAME: [ghc-9.4, ghc-9.6, ghc-9.8]
- UPSTREAM_BRANCH_NAME: [ghc-9.10, ghc-9.12, ghc-9.14]
ARCH: [aarch64, x86_64]
- UPSTREAM_BRANCH_NAME: [master]
ARCH: [aarch64, x86_64]
......@@ -47,7 +47,7 @@ update-repo:
SLOW_VALIDATE: 1
artifacts: false
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "ghc"
trigger:
include: ci/pipelines/update-repo.yml
strategy: depend
......@@ -61,7 +61,7 @@ update-repo:
update-branch:
stage: update-branch
rules:
- if: $CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE != 'merge_request_event'
- if: $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "ghc" && $CI_PIPELINE_SOURCE != 'merge_request_event'
trigger:
include: ci/pipelines/update-branch.yml
strategy: depend
......
......@@ -3,13 +3,10 @@
cat >/etc/nix/nix.conf <<EOF
sandbox = false
build-users-group =
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
substituters = https://cache.nixos.org https://cache.zw3rk.com
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.nixos.org
experimental-features = nix-command flakes
cores = 1 # to avoid resource exhaustion. See: <https://gitlab.haskell.org/ghc/head.hackage/-/issues/38>
EOF
# Equivalent to running `nix develop` but works in CI scripts.
# We take care to avoid setting the temp dir as this will break unsandboxed builds.
# See: https://github.com/NixOS/nix/issues/1802
. <(nix print-dev-env | grep -v "export TE*MP" )
. <(nix print-dev-env)
{
"nodes": {
"all-cabal-hashes": {
"flake": false,
"locked": {
"lastModified": 1696837982,
"narHash": "sha256-QebSglEs/Xar/Z/59Fjmv7WDy9Zj1A+7iAJ5yDb7Sjg=",
"owner": "commercialhaskell",
"repo": "all-cabal-hashes",
"rev": "b39aba9b53425d4160667f75b0e1e9ecd3c8bce9",
"type": "github"
},
"original": {
"owner": "commercialhaskell",
"ref": "hackage",
"repo": "all-cabal-hashes",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
......@@ -36,15 +19,16 @@
"ghc-artefact-nix": {
"flake": false,
"locked": {
"lastModified": 1671037040,
"narHash": "sha256-2rPvuEi2V5PD4k6JqbHuhl/ciBrxq50++6XG9NfwVJ0=",
"owner": "mpickering",
"lastModified": 1756058013,
"narHash": "sha256-Oq4wOx3QljTfhF4kW18T7MTVSR5QGGq4hKj9/yreaa8=",
"owner": "TeofilC",
"repo": "ghc-artefact-nix",
"rev": "3684936ecde09234f51410e07ccd1c7f48d4f4ac",
"rev": "6860cef5ea84f118913d759035620964a028c435",
"type": "github"
},
"original": {
"owner": "mpickering",
"owner": "TeofilC",
"ref": "wip/python3",
"repo": "ghc-artefact-nix",
"type": "github"
}
......@@ -52,11 +36,11 @@
"hackage-security": {
"flake": false,
"locked": {
"lastModified": 1696439837,
"narHash": "sha256-3/swYPrsBuHl9//S/PwmDqyG2ZIi5c2OCBob3qjkidU=",
"lastModified": 1725697204,
"narHash": "sha256-zaLDDeKQpBVaSBRKv/X3WTfeu0rLazy5H8AfJQlsVGM=",
"owner": "haskell",
"repo": "hackage-security",
"rev": "0b501400a4b52593dfab7a1b106fcebdaeba6af7",
"rev": "8ada49de74456f3aebd2ae08cf11151acbf8ef05",
"type": "github"
},
"original": {
......@@ -67,11 +51,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1696604326,
"narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=",
"lastModified": 1733392399,
"narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "87828a0e03d1418e848d3dd3f3014a632e4a4f64",
"rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661",
"type": "github"
},
"original": {
......@@ -99,7 +83,6 @@
},
"root": {
"inputs": {
"all-cabal-hashes": "all-cabal-hashes",
"flake-compat": "flake-compat",
"ghc-artefact-nix": "ghc-artefact-nix",
"hackage-security": "hackage-security",
......
{
description = "head.hackage";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.ghc-artefact-nix.url = "github:mpickering/ghc-artefact-nix";
inputs.ghc-artefact-nix.url = "github:TeofilC/ghc-artefact-nix/wip/python3";
inputs.ghc-artefact-nix.flake = false;
inputs.all-cabal-hashes.url = "github:commercialhaskell/all-cabal-hashes/hackage";
inputs.all-cabal-hashes.flake = false;
inputs.hackage-security.url = "github:haskell/hackage-security";
inputs.hackage-security.flake = false;
inputs.overlay-tool.url = "github:bgamari/hackage-overlay-repo-tool";
......
diff --git a/Agda.cabal b/Agda.cabal
index 9a0863c..cc2f024 100644
--- a/Agda.cabal
+++ b/Agda.cabal
@@ -1,7 +1,7 @@
cabal-version: 2.4
name: Agda
version: 2.7.0.1
-build-type: Custom
+build-type: Simple
license: MIT
license-file: LICENSE
copyright: (c) 2005-2024 The Agda Team.
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
index 7064a95..0000000
--- a/Setup.hs
+++ /dev/null
@@ -1,235 +0,0 @@
-{-# LANGUAGE BlockArguments #-}
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-
-import Data.Functor ( (<&>) )
-import Data.List ( intercalate )
-import Data.Maybe ( catMaybes )
-
-import Distribution.Simple
-import Distribution.Simple.LocalBuildInfo
-import Distribution.Simple.Setup
-import Distribution.Simple.BuildPaths (exeExtension)
-import Distribution.PackageDescription
-import Distribution.System ( buildPlatform )
-
-import System.FilePath
-import System.Directory (doesFileExist, makeAbsolute, removeFile)
-import System.Environment (getEnvironment)
-import System.Process
-import System.Exit
-import System.IO
-import System.IO.Error (isDoesNotExistError)
-
-import Control.Monad
-import Control.Exception
-
-main :: IO ()
-main = defaultMainWithHooks userhooks
-
-userhooks :: UserHooks
-userhooks = simpleUserHooks
- { copyHook = copyHook'
- , instHook = instHook'
- }
-
--- Install and copy hooks are default, but amended with .agdai files in data-files.
-instHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO ()
-instHook' pd lbi hooks flags = instHook simpleUserHooks pd' lbi hooks flags where
- pd' = pd { dataFiles = concatMap (expandAgdaExt pd) $ dataFiles pd }
-
--- Andreas, 2020-04-25, issue #4569: defer 'generateInterface' until after
--- the library has been copied to a destination where it can be found.
--- @cabal build@ will likely no longer produce the .agdai files, but @cabal install@ does.
-copyHook' :: PackageDescription -> LocalBuildInfo -> UserHooks -> CopyFlags -> IO ()
-copyHook' pd lbi hooks flags = do
- -- Copy library and executable etc.
- copyHook simpleUserHooks pd lbi hooks flags
- if wantInterfaces flags && not (skipInterfaces lbi) then do
- -- Generate .agdai files.
- success <- generateInterfaces pd lbi
- -- Copy again, now including the .agdai files.
- when success $ copyHook simpleUserHooks pd' lbi hooks flags
- else
- putStrLn "Skipping generation of Agda core library interface files"
- where
- pd' = pd
- { dataFiles = concatMap (expandAgdaExt pd) $ dataFiles pd
- -- Andreas, 2020-04-25, issue #4569:
- -- I tried clearing some fields to avoid copying again.
- -- However, cabal does not like me messing with the PackageDescription.
- -- Clearing @library@ or @executables@ leads to internal errors.
- -- Thus, we just copy things again. Not a terrible problem.
- -- , library = Nothing
- -- , executables = []
- -- , subLibraries = []
- -- , foreignLibs = []
- -- , testSuites = []
- -- , benchmarks = []
- -- , extraSrcFiles = []
- -- , extraTmpFiles = []
- -- , extraDocFiles = []
- }
-
--- We only want to write interfaces if installing the executable.
--- If we're installing *just* the library, the interface files are not needed
--- and, most importantly, the executable will not be available to be run (cabal#10235)
-wantInterfaces :: CopyFlags -> Bool
-wantInterfaces _flags = do
-#if MIN_VERSION_Cabal(3,11,0)
- any isAgdaExe (copyArgs _flags)
- where
- isAgdaExe "exe:agda" = True
- isAgdaExe _ = False
-#else
- True
-#endif
-
--- Used to add .agdai files to data-files
-expandAgdaExt :: PackageDescription -> FilePath -> [FilePath]
-expandAgdaExt pd = \ fp ->
- -- N.B. using lambda here so that @expandAgdaExt pd@ can be partially evaluated.
- if takeExtension fp == ".agda" then [ fp, iFile fp ] else [ fp ]
- where
- iFile = toIFile pd
-
-version :: PackageDescription -> String
-version = intercalate "." . map show . versionNumbers . pkgVersion . package
-
--- | This returns @lib/prim@.
---
-projectRoot :: PackageDescription -> FilePath
-projectRoot pd = takeDirectory agdaLibFile
- where
- [agdaLibFile] = filter ((".agda-lib" ==) . takeExtension) $ dataFiles pd
-
--- | Turns e.g. @lib/prim/Agda/Primitive.agda@
--- into @lib/prim/_build/2.7.0/agda/Agda/Primitive.agdai@.
---
--- An absolute path will be returned unchanged.
-toIFile ::
- PackageDescription
- -> FilePath -- ^ Should be a relative path.
- -> FilePath -- ^ Then this is also a relative path.
-toIFile pd = (buildDir </>) . fileName
- where
- root = projectRoot pd
- -- e.g. root = "lib/prim"
- buildDir = root </> "_build" </> version pd </> "agda"
- -- e.g. buildDir = "lib/prim/_build/2.7.0/agda"
- fileName file = makeRelative root $ replaceExtension file ".agdai"
- -- e.g. fileName "lib/prim/Agda/Primitive.agda" = "Agda/Primitive.agdai"
-
--- Andreas, 2019-10-21, issue #4151:
--- skip the generation of interface files with program suffix "-quicker"
-skipInterfaces :: LocalBuildInfo -> Bool
-skipInterfaces lbi = fromPathTemplate (progSuffix lbi) == "-quicker"
-
--- | Returns 'True' if call to Agda executes without error.
---
-generateInterfaces :: PackageDescription -> LocalBuildInfo -> IO Bool
-generateInterfaces pd lbi = do
-
- putStrLn "Generating Agda core library interface files..."
-
- -- for debugging, these are examples how you can inspect the flags...
- -- print $ flagAssignment lbi
- -- print $ fromPathTemplate $ progSuffix lbi
-
- -- then...
- let bdir = buildDir lbi
- agda = bdir </> "agda" </> "agda" <.> agdaExeExtension
-
- -- We should be in the current directory root of the cabal package
- -- and data-files reside in src/data relative to this.
- --
- ddir <- makeAbsolute $ "src" </> "data"
-
- -- The Agda.Primitive* and Agda.Builtin* modules.
- let builtins = filter ((== ".agda") . takeExtension) (dataFiles pd)
-
- -- The absolute filenames of their interfaces.
- let interfaces = map ((ddir </>) . toIFile pd) builtins
-
- -- Remove all existing .agdai files.
- forM_ interfaces $ \ fp -> removeFile fp `catch` \ e ->
- unless (isDoesNotExistError e) $ throwIO e
-
- -- Type-check all builtin modules (in a single Agda session to take
- -- advantage of caching).
- let agdaDirEnvVar = "Agda_datadir"
- let agdaArgs =
- [ "--interaction"
- , "--interaction-exit-on-error"
- , "-Werror"
- , "-v0"
- ]
- let loadBuiltinCmds = concat
- [ [ cmd ("Cmd_load " ++ f ++ " []")
- , cmd "Cmd_no_metas"
- -- Fail if any meta-variable is unsolved.
- ]
- | b <- builtins
- , let f = show (ddir </> b)
- cmd c = "IOTCM " ++ f ++ " None Indirect (" ++ c ++ ")"
- ]
- let callLines = concat
- [ [ unwords $ concat
- [ [ concat [ agdaDirEnvVar, "=", ddir ] ]
- , [ agda ]
- , agdaArgs
- , [ "<<EOF" ]
- ]
- ]
- , loadBuiltinCmds
- , [ "EOF" ]
- ]
- let onIOError (e :: IOException) = False <$ do
- warn $ concat
- [ [ "*** Could not generate Agda library interface files."
- , "*** Reason:"
- , show e
- , "*** The attempted call to Agda was:"
- ]
- , callLines
- ]
- env <- getEnvironment
- handle onIOError $ do
-
- -- Generate interface files via a call to Agda.
- readCreateProcess
- (proc agda agdaArgs)
- { delegate_ctlc = True
- -- Make Agda look for data files in a
- -- certain place.
- , env = Just ((agdaDirEnvVar, ddir) : env)
- }
- (unlines loadBuiltinCmds)
-
- -- Check whether all interface files have been generated.
- missing <- catMaybes <$> forM interfaces \ f ->
- doesFileExist f <&> \case
- True -> Nothing
- False -> Just f
-
- -- Warn if not all interface files have been generated, but don't crash.
- -- This might help with issue #7455.
- let success = null missing
- unless success $ warn $ concat
- [ [ "*** Agda failed to generate the following library interface files:" ]
- , missing
- ]
- return success
-
-warn :: [String] -> IO ()
-warn msgs = putStr $ unlines $ concat
- [ [ "*** Warning!" ]
- , msgs
- , [ "*** Ignoring error, continuing installation..." ]
- ]
-
-
-
-agdaExeExtension :: String
-agdaExeExtension = exeExtension buildPlatform
diff --git a/.ghci b/.ghci
new file mode 100644
index 0000000..b729eb0
--- /dev/null
+++ b/.ghci
@@ -0,0 +1,28 @@
+:set -Wall -fno-warn-name-shadowing -Wcompat
+:set -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
+:set -Wunused-binds -Wunused-imports -Worphans
+
+:set -isrc
+:set -itest
+
+:set -XFlexibleContexts
+:set -XFlexibleInstances
+:set -XGeneralizedNewtypeDeriving
+:set -XScopedTypeVariables
+:set -XTupleSections
+:set -XTypeFamilies
+
+:load Main Algebra.Graph.Labelled.Example.Automaton Algebra.Graph.Labelled.Example.Network
+
+:set prompt "\x03BB> "
+:set prompt-cont "\x03BB| "
+:!cls
+
+:{
+:def alga \top -> return $ unlines $
+ [ ":set -XOverloadedLists"
+ , ":set -XOverloadedStrings"
+ , ":set -fno-warn-type-defaults"
+ , ":m Algebra.Graph" ++ (if null top then "" else ".") ++ top
+ , ":show imports" ]
+:}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..dcce6e2
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,42 @@
+on:
+ push:
+ pull_request:
+ schedule:
+ - cron: '0 3 * * 6' # 3am Saturday
+ workflow_dispatch:
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest]
+ ghc: ['9.8.2', '9.6.3', '9.4.7', '9.2.8', '9.0.2', '8.10.7']
+ include:
+ - os: windows-latest
+ # Testing on MacOS is disabled until GitHub actions support 'allow-failure'
+ # - os: macOS-latest
+
+ steps:
+ - run: git config --global core.autocrlf false
+ - uses: actions/checkout@v4
+ - uses: haskell-actions/setup@v2
+ id: setup-haskell
+ with:
+ ghc-version: ${{ matrix.ghc }}
+ - name: Get GHC libdir
+ id: get-ghc-libdir
+ run: |
+ echo "name=libdir::$(ghc --print-libdir)" >> $GITHUB_OUTPUT
+ shell: bash
+ - run: cabal v2-freeze --enable-tests
+ - uses: actions/cache@v4
+ with:
+ path: ${{ steps.setup-haskell.outputs.cabal-store }}
+ key: ${{ runner.os }}-${{ matrix.ghc }}-${{ steps.get-ghc-libdir.outputs.libdir }}-${{ hashFiles('cabal.project.freeze') }}
+ - uses: snowleopard/neil@master
+ with:
+ github-user: snowleopard
+ hlint-arguments: src
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2684ce5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+dist
+dist-*
+.ghc.environment.*
+cabal-dev
+*.o
+*.hi
+*.chi
+*.chs.h
+*.dyn_o
+*.dyn_hi
+.hpc
+.hsenv
+.cabal-sandbox/
+cabal.sandbox.config
+*.prof
+*.aux
+*.hp
+*.eventlog
+.stack-work/
+cabal.project.local
+ghcid.txt
+.vscode/
+*.swp
+*.swo
+*.swn
+.log
+stack.yaml.lock
diff --git a/.hlint.yaml b/.hlint.yaml
new file mode 100644
index 0000000..7c154f9
--- /dev/null
+++ b/.hlint.yaml
@@ -0,0 +1,67 @@
+# HLint configuration file
+# https://github.com/ndmitchell/hlint
+##########################
+
+# This file contains a template configuration file, which is typically
+# placed as .hlint.yaml in the root of your project
+
+# Specify additional command line arguments
+#
+# - arguments: [--color, --cpp-simple, -XQuasiQuotes]
+
+# Control which extensions/flags/modules/functions can be used
+#
+# - extensions:
+# - default: false # all extension are banned by default
+# - name: [PatternGuards, ViewPatterns] # only these listed extensions can be used
+# - {name: CPP, within: CrossPlatform} # CPP can only be used in a given module
+#
+# - flags:
+# - {name: -w, within: []} # -w is allowed nowhere
+#
+# - modules:
+# - {name: [Data.Set, Data.HashSet], as: Set} # if you import Data.Set qualified, it must be as 'Set'
+# - {name: Control.Arrow, within: []} # Certain modules are banned entirely
+#
+# - functions:
+# - {name: unsafePerformIO, within: []} # unsafePerformIO can only appear in no modules
+
+# Add custom hints for this project
+#
+# Will suggest replacing "wibbleMany [myvar]" with "wibbleOne myvar"
+# - error: {lhs: "wibbleMany [x]", rhs: wibbleOne x}
+
+# The hints are named by the string they display in warning messages.
+# For example, if you see a warning starting like
+#
+# Main.hs:116:51: Warning: Redundant ==
+#
+# You can refer to that hint with `{name: Redundant ==}` (see below).
+
+# Turn on hints that are off by default
+#
+# Ban "module X(module X) where", to require a real export list
+# - warn: {name: Use explicit module export list}
+#
+# Replace a $ b $ c with a . b $ c
+# - group: {name: dollar, enabled: true}
+#
+# Generalise map to fmap, ++ to <>
+# - group: {name: generalise, enabled: true}
+
+# Ignore some builtin hints
+# - ignore: {name: Use const, within: SpecialModule} # Only within certain modules
+
+- ignore:
+ name: Use if
+ within: Algebra.Graph.Bipartite.AdjacencyMap.Algorithm
+
+- ignore:
+ name: Avoid NonEmpty.unzip
+ within: Algebra.Graph.NonEmpty.AdjacencyMap
+
+# Define some custom infix operators
+# - fixity: infixr 3 ~^#^~
+
+# To generate a suitable file for HLint do:
+# $ hlint --default > .hlint.yaml
diff --git a/CHANGES.md b/CHANGES.md
index d391d4d..05209ba 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,10 @@
# Change log
+## 0.8
+
+* #305, #312: Support GHC 9.4, GHC 9.6 and GHC 9.8.
+* #303, #314: Stop supporting GHC 8.4, GHC 8.6 and GHC 8.8.
+
## 0.7
* #294: Change the argument order of `bfs*`, `dfs*` and `reachable` algorithms.
diff --git a/LICENSE b/LICENSE
index 2a4d793..a876d01 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2016-2022 Andrey Mokhov
+Copyright (c) 2016-2024 Andrey Mokhov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index c92f8f7..ac78cf6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Algebraic graphs
-[![Hackage version](https://img.shields.io/hackage/v/algebraic-graphs.svg?label=Hackage)](https://hackage.haskell.org/package/algebraic-graphs) [![Build status](https://img.shields.io/github/workflow/status/snowleopard/alga/ci/master.svg)](https://github.com/snowleopard/alga/actions)
+[![Hackage version](https://img.shields.io/hackage/v/algebraic-graphs.svg?label=Hackage)](https://hackage.haskell.org/package/algebraic-graphs) [![Build status](https://img.shields.io/github/actions/workflow/status/snowleopard/alga/ci.yml?branch=master)](https://github.com/snowleopard/alga/actions)
**Alga** is a library for algebraic construction and manipulation of graphs in Haskell. See
[this Haskell Symposium paper](https://github.com/snowleopard/alga-paper) and the
diff --git a/algebraic-graphs.cabal b/algebraic-graphs.cabal
index c180ffe..fb58b61 100644
--- a/algebraic-graphs.cabal
+++ b/algebraic-graphs.cabal
@@ -1,18 +1,18 @@
cabal-version: 2.2
name: algebraic-graphs
-version: 0.7
+version: 0.8
synopsis: A library for algebraic graph construction and transformation
license: MIT
license-file: LICENSE
author: Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
maintainer: Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard,
Alexandre Moine <alexandre@moine.me>, github: @nobrakal
-copyright: Andrey Mokhov, 2016-2022
+copyright: Andrey Mokhov, 2016-2024
homepage: https://github.com/snowleopard/alga
bug-reports: https://github.com/snowleopard/alga/issues
category: Algebra, Algorithms, Data Structures, Graphs
build-type: Simple
-tested-with: GHC==9.2, GHC==9.0, GHC==8.10, GHC==8.8, GHC==8.6, GHC==8.4
+tested-with: GHC==9.8.2, GHC==9.6.3, GHC==9.4.7, GHC==9.2.8, GHC==9.0.2, GHC==8.10.7
description:
<https://github.com/snowleopard/alga Alga> is a library for algebraic construction and
manipulation of graphs in Haskell. See <https://github.com/snowleopard/alga-paper this paper>
@@ -68,10 +68,10 @@ source-repository head
common common-settings
build-depends: array >= 0.4 && < 0.6,
- base >= 4.11 && < 5,
- containers >= 0.5.5.1 && < 0.8,
- deepseq >= 1.3.0.1 && < 1.5,
- transformers >= 0.4 && < 0.6
+ base >= 4.12 && < 5,
+ containers >= 0.5.5.1 && < 0.9,
+ deepseq >= 1.3.0.1 && < 1.6,
+ transformers >= 0.4 && < 0.7
default-language: Haskell2010
default-extensions: ConstraintKinds
DeriveFunctor
@@ -86,6 +86,7 @@ common common-settings
TupleSections
TypeApplications
TypeFamilies
+ TypeOperators
other-extensions: CPP
OverloadedStrings
RecordWildCards
@@ -162,6 +163,6 @@ test-suite main
build-depends: algebraic-graphs,
extra >= 1.4 && < 2,
inspection-testing >= 0.4.2.2 && < 0.6,
- QuickCheck >= 2.14 && < 2.15
+ QuickCheck >= 2.14 && < 2.16
other-extensions: ConstrainedClassMethods
TemplateHaskell
diff --git a/src/Algebra/Graph.hs b/src/Algebra/Graph.hs
index 4ab0aaf..5a15900 100644
--- a/src/Algebra/Graph.hs
+++ b/src/Algebra/Graph.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -56,7 +56,7 @@ import Control.Monad.Trans.State (runState, get, put)
import Data.Foldable (toList)
import Data.Maybe (fromMaybe)
import Data.String
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import GHC.Generics
import Algebra.Graph.Internal
diff --git a/src/Algebra/Graph/Acyclic/AdjacencyMap.hs b/src/Algebra/Graph/Acyclic/AdjacencyMap.hs
index e46d9e9..65fb007 100644
--- a/src/Algebra/Graph/Acyclic/AdjacencyMap.hs
+++ b/src/Algebra/Graph/Acyclic/AdjacencyMap.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Acyclic.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/AdjacencyIntMap.hs b/src/Algebra/Graph/AdjacencyIntMap.hs
index c90d2db..e351bd2 100644
--- a/src/Algebra/Graph/AdjacencyIntMap.hs
+++ b/src/Algebra/Graph/AdjacencyIntMap.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.AdjacencyIntMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -51,7 +51,7 @@ import Data.IntSet (IntSet)
import Data.List ((\\))
import Data.Monoid (Sum (..))
import Data.Set (Set)
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import GHC.Generics
import qualified Data.IntMap.Strict as IntMap
diff --git a/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs b/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs
index f27c023..cb86177 100644
--- a/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs
+++ b/src/Algebra/Graph/AdjacencyIntMap/Algorithm.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.AdjacencyIntMap.Algorithm
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : unstable
diff --git a/src/Algebra/Graph/AdjacencyMap.hs b/src/Algebra/Graph/AdjacencyMap.hs
index 6ef5333..a67d50b 100644
--- a/src/Algebra/Graph/AdjacencyMap.hs
+++ b/src/Algebra/Graph/AdjacencyMap.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -55,12 +55,13 @@ import Data.Map.Strict (Map)
import Data.Monoid
import Data.Set (Set)
import Data.String
-import Data.Tree
import GHC.Generics
+import Data.Tree (Tree(..), Forest)
import qualified Data.Map.Strict as Map
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
+import qualified Data.Tree as Tree
{-| The 'AdjacencyMap' data type represents a graph by a map of vertices to
their adjacency sets. We define a 'Num' instance as a convenient notation for
diff --git a/src/Algebra/Graph/AdjacencyMap/Algorithm.hs b/src/Algebra/Graph/AdjacencyMap/Algorithm.hs
index 3fb9f95..c3df293 100644
--- a/src/Algebra/Graph/AdjacencyMap/Algorithm.hs
+++ b/src/Algebra/Graph/AdjacencyMap/Algorithm.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.AdjacencyMap.Algorithm
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : unstable
@@ -33,16 +33,16 @@ import Data.Foldable (for_)
import Data.Either
import Data.List.NonEmpty (NonEmpty(..), (<|))
import Data.Maybe
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import Algebra.Graph.AdjacencyMap
-import Algebra.Graph.Internal
import qualified Algebra.Graph.NonEmpty.AdjacencyMap as NonEmpty
import qualified Data.Array as Array
import qualified Data.List as List
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
+import qualified Data.Tree as Tree
-- | Compute the /breadth-first search/ forest of a graph, such that adjacent
-- vertices are explored in increasing order according to their 'Ord' instance.
@@ -76,7 +76,7 @@ import qualified Data.Set as Set
bfsForest :: Ord a => AdjacencyMap a -> [a] -> Forest a
bfsForest x vs = evalState (explore [ v | v <- vs, hasVertex v x ]) Set.empty
where
- explore = filterM discovered >=> unfoldForestM_BF walk
+ explore = filterM discovered >=> Tree.unfoldForestM_BF walk
walk v = (v,) <$> adjacentM v
adjacentM v = filterM discovered $ Set.toList (postSet v x)
discovered v = do new <- gets (not . Set.member v)
@@ -109,7 +109,7 @@ bfsForest x vs = evalState (explore [ v | v <- vs, hasVertex v x ]) Set.empty
-- 'map' 'concat' . 'List.transpose' . 'map' 'levels' . 'bfsForest' x == bfs x
-- @
bfs :: Ord a => AdjacencyMap a -> [a] -> [[a]]
-bfs x = map concat . List.transpose . map levels . bfsForest x
+bfs x = map concat . List.transpose . map Tree.levels . bfsForest x
dfsForestFromImpl :: Ord a => AdjacencyMap a -> [a] -> Forest a
dfsForestFromImpl g vs = evalState (explore vs) Set.empty
@@ -202,7 +202,7 @@ dfsForestFrom g vs = dfsForestFromImpl g [ v | v <- vs, hasVertex v g ]
-- dfs ('circuit' [1..5] + 'circuit' [5,4..1]) [3] == [3,2,1,5,4]
-- @
dfs :: Ord a => AdjacencyMap a -> [a] -> [a]
-dfs x = concatMap flatten . dfsForestFrom x
+dfs x = concatMap Tree.flatten . dfsForestFrom x
-- | Return the list of vertices /reachable/ from a source vertex in a graph.
-- The vertices in the resulting list appear in the /depth-first search order/.
@@ -381,23 +381,25 @@ gabowSCC g =
-- called when exiting vertex v. if v is the bottom of a scc
-- boundary, we add a new SCC, otherwise v is part of a larger scc
-- being constructed and we continue.
- exit v = do newComponent <- (v==).snd.head <$> gets boundaryStack
- when newComponent $ insertComponent v
- return newComponent
+ exit v = do boundaryStack <- gets boundaryStack
+ case boundaryStack of
+ (p_top, top) : newBoundaryStack | v == top -> do
+ insertComponent p_top top newBoundaryStack
+ return True
- insertComponent v = modify'
- (\(SCC pre scc bnd pth pres sccs gs es_i es_o) ->
+ _ -> return False
+
+ insertComponent p_v v newBoundaryStack = modify'
+ (\(SCC pre scc _oldBoundaryStack pth pres sccs gs es_i es_o) ->
let (curr,v_pth') = span (/=v) pth
- pth' = tail v_pth' -- Here we know that v_pth' starts with v
+ pth' = drop 1 v_pth' -- Here we know that v_pth' starts with v
(es,es_i') = span ((>=p_v).fst) es_i
g_i | null es = vertex v
| otherwise = edges (snd <$> es)
- p_v = fst $ head bnd
scc' = scc + 1
- bnd' = tail bnd
sccs' = List.foldl' (\sccs x -> Map.insert x scc sccs) sccs (v:curr)
gs' = g_i:gs
- in SCC pre scc' bnd' pth' pres sccs' gs' es_i' es_o)
+ in SCC pre scc' newBoundaryStack pth' pres sccs' gs' es_i' es_o)
inedge uv = modify'
(\(SCC pre scc bnd pth pres sccs gs es_i es_o) ->
diff --git a/src/Algebra/Graph/Bipartite/AdjacencyMap.hs b/src/Algebra/Graph/Bipartite/AdjacencyMap.hs
index a451946..daefe4f 100644
--- a/src/Algebra/Graph/Bipartite/AdjacencyMap.hs
+++ b/src/Algebra/Graph/Bipartite/AdjacencyMap.hs
@@ -1,7 +1,7 @@
----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Bipartite.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -53,19 +53,13 @@ module Algebra.Graph.Bipartite.AdjacencyMap (
consistent
) where
-import Control.Monad
-import Control.Monad.Trans.Maybe
-import Control.Monad.Trans.State
import Data.Either
-import Data.Foldable (asum)
import Data.List ((\\), sort)
import Data.Map.Strict (Map)
-import Data.Maybe
import Data.Set (Set)
import GHC.Exts (IsList(..))
import GHC.Generics
-import qualified Algebra.Graph as G
import qualified Algebra.Graph.AdjacencyMap as AM
import qualified Data.Map.Strict as Map
diff --git a/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs b/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs
index f9ee73f..5c7b062 100644
--- a/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs
+++ b/src/Algebra/Graph/Bipartite/AdjacencyMap/Algorithm.hs
@@ -2,7 +2,7 @@
----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Bipartite.AdjacencyMap.Algorithm
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Class.hs b/src/Algebra/Graph/Class.hs
index 4f6f78e..e9c7f7b 100644
--- a/src/Algebra/Graph/Class.hs
+++ b/src/Algebra/Graph/Class.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Class
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -46,7 +46,7 @@ module Algebra.Graph.Class (
path, circuit, clique, biclique, star, tree, forest
) where
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import Algebra.Graph.Label (Dioid, one)
diff --git a/src/Algebra/Graph/Example/Todo.hs b/src/Algebra/Graph/Example/Todo.hs
index 9bf274c..ea6924b 100644
--- a/src/Algebra/Graph/Example/Todo.hs
+++ b/src/Algebra/Graph/Example/Todo.hs
@@ -1,5 +1,13 @@
{-# LANGUAGE OverloadedStrings #-}
-module Algebra.Graph.Example.Todo (Todo, todo, low, high, (~*~), (>*<), priority) where
+module Algebra.Graph.Example.Todo (
+ -- * Creating and manipulating to-do lists
+ Todo, todo, low, high, (~*~), (>*<), priority,
+
+ -- * Examples
+ shopping, holiday
+ ) where
+
+-- Based on https://blogs.ncl.ac.uk/andreymokhov/graphs-in-disguise/
import Data.Map (Map)
import Data.String
@@ -13,10 +21,10 @@ import qualified Data.Map as Map
data Todo a = T (Map a Int) (AdjacencyMap a) deriving Show
instance Ord a => Eq (Todo a) where
- x == y = todo x == todo y
+ x == y = todo x == todo y
instance (IsString a, Ord a) => IsString (Todo a) where
- fromString = C.vertex . fromString
+ fromString = C.vertex . fromString
-- Lower the priority of items in a given todo list
low :: Todo a -> Todo a
@@ -39,8 +47,7 @@ x ~*~ y = low x `C.connect` high y
x >*< y = high x `C.connect` low y
todo :: forall a. Ord a => Todo a -> Maybe [a]
-todo (T p g) =
- case AM.topSort $ gmap prioritise g of
+todo (T p g) = case AM.topSort $ gmap prioritise g of
Left _ -> Nothing
Right xs -> Just $ map snd xs
where
@@ -48,16 +55,26 @@ todo (T p g) =
prioritise x = (negate $ Map.findWithDefault 0 x p, x)
instance (IsString a, Ord a) => Num (Todo a) where
- fromInteger i = fromString $ show (fromInteger i :: Integer)
- (+) = C.overlay
- (*) = C.connect
- signum = const C.empty
- abs = id
- negate = id
+ fromInteger i = fromString $ show (fromInteger i :: Integer)
+ (+) = C.overlay
+ (*) = C.connect
+ signum = const C.empty
+ abs = id
+ negate = id
instance Ord a => Graph (Todo a) where
- type Vertex (Todo a) = a
- empty = T Map.empty AM.empty
- vertex x = T (Map.singleton x 0) (C.vertex x)
- overlay (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.overlay g1 g2)
- connect (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.connect g1 g2)
+ type Vertex (Todo a) = a
+ empty = T Map.empty AM.empty
+ vertex x = T (Map.singleton x 0) (C.vertex x)
+ overlay (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.overlay g1 g2)
+ connect (T p1 g1) (T p2 g2) = T (Map.unionWith (+) p1 p2) (C.connect g1 g2)
+
+-- λ> todo shopping
+-- Just ["coat","presents","phone wife","scarf"]
+shopping :: Todo String
+shopping = "presents" + "coat" + "phone wife" ~*~ "scarf"
+
+-- λ> todo holiday
+-- Just ["coat","presents","phone wife","scarf","pack","travel"]
+holiday :: Todo String
+holiday = shopping * "pack" * "travel"
diff --git a/src/Algebra/Graph/Export.hs b/src/Algebra/Graph/Export.hs
index f2e9b54..f7d7707 100644
--- a/src/Algebra/Graph/Export.hs
+++ b/src/Algebra/Graph/Export.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Export
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -37,7 +37,7 @@ import Algebra.Graph.Internal
-- implementation uses difference lists). Here @s@ is the type of abstract
-- symbols or strings (text or binary). 'Doc' @s@ is a 'Monoid', therefore
-- 'mempty' corresponds to the /empty document/ and two documents can be
--- concatenated with 'mappend' (or operator 'Data.Monoid.<>'). Documents
+-- concatenated with 'mappend' (or operator 'Data.Semigroup.<>'). Documents
-- comprising a single symbol or string can be constructed using the function
-- 'literal'. Alternatively, you can construct documents as string literals,
-- e.g. simply as @"alga"@, by using the @OverloadedStrings@ GHC extension. To
@@ -91,7 +91,7 @@ isEmpty (Doc xs) = null xs
-- constructed directly from string literals (see the second example below).
--
-- @
--- literal "Hello, " 'Data.Monoid.<>' literal "World!" == literal "Hello, World!"
+-- literal "Hello, " 'Data.Semigroup.<>' literal "World!" == literal "Hello, World!"
-- literal "I am just a string literal" == "I am just a string literal"
-- 'render' . literal == 'id'
-- @
@@ -101,8 +101,8 @@ literal = Doc . pure
-- | Render the document as a single string. An inverse of the function 'literal'.
--
-- @
--- render ('literal' "al" 'Data.Monoid.<>' 'literal' "ga") :: ('IsString' s, 'Monoid' s) => s
--- render ('literal' "al" 'Data.Monoid.<>' 'literal' "ga") == "alga"
+-- render ('literal' "al" 'Data.Semigroup.<>' 'literal' "ga") :: ('IsString' s, 'Monoid' s) => s
+-- render ('literal' "al" 'Data.Semigroup.<>' 'literal' "ga") == "alga"
-- render 'mempty' == 'mempty'
-- render . 'literal' == 'id'
-- @
diff --git a/src/Algebra/Graph/Export/Dot.hs b/src/Algebra/Graph/Export/Dot.hs
index 4770a2c..22ae461 100644
--- a/src/Algebra/Graph/Export/Dot.hs
+++ b/src/Algebra/Graph/Export/Dot.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Export.Dot
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -21,7 +21,7 @@ module Algebra.Graph.Export.Dot (
export, exportAsIs, exportViaShow
) where
-import Data.List (map, null, intersperse)
+import Data.List (intersperse)
import Data.Monoid
import Data.String hiding (unlines)
import Prelude hiding (unlines)
diff --git a/src/Algebra/Graph/HigherKinded/Class.hs b/src/Algebra/Graph/HigherKinded/Class.hs
index 3a4426b..dcf480f 100644
--- a/src/Algebra/Graph/HigherKinded/Class.hs
+++ b/src/Algebra/Graph/HigherKinded/Class.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.HigherKinded.Class
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -54,7 +54,7 @@ module Algebra.Graph.HigherKinded.Class (
import Control.Applicative (Alternative(empty, (<|>)))
import Control.Monad (MonadPlus, mfilter)
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import qualified Algebra.Graph as G
diff --git a/src/Algebra/Graph/Internal.hs b/src/Algebra/Graph/Internal.hs
index 309c23b..05dc739 100644
--- a/src/Algebra/Graph/Internal.hs
+++ b/src/Algebra/Graph/Internal.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Internal
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -29,13 +29,11 @@ module Algebra.Graph.Internal (
import Data.Coerce
import Data.Foldable
-import Data.IntSet (IntSet)
import Data.Semigroup (Endo (..))
import Data.Set (Set)
-import qualified Data.IntSet as IntSet
-import qualified Data.Set as Set
-import qualified GHC.Exts as Exts
+import qualified Data.Set as Set
+import qualified GHC.Exts as Exts
-- | An abstract list data type with /O(1)/ time concatenation (the current
-- implementation uses difference lists). Here @a@ is the type of list elements.
diff --git a/src/Algebra/Graph/Label.hs b/src/Algebra/Graph/Label.hs
index c36dbb6..dc41588 100644
--- a/src/Algebra/Graph/Label.hs
+++ b/src/Algebra/Graph/Label.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Label
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -22,17 +22,16 @@ module Algebra.Graph.Label (
NonNegative, finite, finiteWord, unsafeFinite, infinite, getFinite,
Distance, distance, getDistance, Capacity, capacity, getCapacity,
Count, count, getCount, PowerSet (..), Minimum, getMinimum, noMinimum,
- Path, Label, isZero, RegularExpression,
+ Path, Label, symbol, symbols, isZero, RegularExpression,
-- * Combining edge labels
Optimum (..), ShortestPath, AllShortestPaths, CountShortestPaths, WidestPath
) where
-import Control.Applicative
import Control.Monad
import Data.Coerce
import Data.Maybe
-import Data.Monoid (Any (..), Monoid (..), Sum (..))
+import Data.Monoid (Any (..), Sum (..))
import Data.Semigroup (Max (..), Min (..))
import Data.Set (Set)
import GHC.Exts (IsList (..))
@@ -72,7 +71,7 @@ Instances of this type class must satisfy the following semiring laws:
> x <.> (y <+> z) == x <.> y <+> x <.> z
> (x <+> y) <.> z == x <.> z <+> y <.> z
-}
-class (Monoid a, Semigroup a) => Semiring a where
+class Monoid a => Semiring a where
one :: a
(<.>) :: a -> a -> a
@@ -285,11 +284,11 @@ fromExtended Infinite = Nothing
instance (Num a, Eq a) => Num (Extended a) where
fromInteger = Finite . fromInteger
- (+) = liftA2 (+)
+ (+) = liftM2 (+)
Finite 0 * _ = Finite 0
_ * Finite 0 = Finite 0
- x * y = liftA2 (*) x y
+ x * y = liftM2 (*) x y
negate = fmap negate
signum = fmap signum
@@ -331,7 +330,7 @@ instance (Monoid a, Ord a) => Monoid (Minimum a) where
instance (Monoid a, Ord a) => Semiring (Minimum a) where
one = pure mempty
- (<.>) = liftA2 mappend
+ (<.>) = liftM2 mappend
instance (Monoid a, Ord a) => Dioid (Minimum a)
@@ -364,8 +363,8 @@ instance (Monoid a, Ord a) => Semiring (PowerSet a) where
instance (Monoid a, Ord a) => Dioid (PowerSet a) where
--- | The type of /free labels/ over the underlying set of symbols @a@. This data
--- type is an instance of classes 'StarSemiring' and 'Dioid'.
+-- | The type of /free labels/ over the underlying set of symbols @a@. 'Label' values
+-- can be manipulated via its 'Semigroup', 'Monoid' and 'StarSemiring' class instances.
data Label a = Zero
| One
| Symbol a
@@ -377,9 +376,17 @@ data Label a = Zero
infixl 6 :+:
infixl 7 :*:
+-- | Wrap a value into a 'Symbol' constructor
+symbol :: a -> Label a
+symbol = Symbol
+
+-- | Wrap a list of values into 'Symbol' constructors terminated by 'Zero'
+symbols :: Foldable t => t a -> Label a
+symbols = foldr ((<>) . Symbol) Zero
+
instance IsList (Label a) where
type Item (Label a) = a
- fromList = foldr ((<>) . Symbol) Zero
+ fromList = symbols
toList = error "Label.toList cannot be given a reasonable definition"
instance Show a => Show (Label a) where
diff --git a/src/Algebra/Graph/Labelled.hs b/src/Algebra/Graph/Labelled.hs
index adf9ab2..4e808cf 100644
--- a/src/Algebra/Graph/Labelled.hs
+++ b/src/Algebra/Graph/Labelled.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Labelled
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -54,10 +54,9 @@ import Algebra.Graph.Label
import qualified Algebra.Graph.Labelled.AdjacencyMap as AM
import qualified Algebra.Graph.ToGraph as T
-import qualified Data.IntSet as IntSet
-import qualified Data.Set as Set
-import qualified Data.Map as Map
-import qualified GHC.Exts as Exts
+import qualified Data.Set as Set
+import qualified Data.Map as Map
+import qualified GHC.Exts as Exts
-- | Edge-labelled graphs, where the type variable @e@ stands for edge labels.
-- For example, 'Graph' @Bool@ @a@ is isomorphic to unlabelled graphs defined in
@@ -71,7 +70,7 @@ data Graph e a = Empty
instance (Eq e, Monoid e, Ord a) => Eq (Graph e a) where
x == y = toAdjacencyMap x == toAdjacencyMap y
-instance (Eq e, Monoid e, Ord a, Ord e) => Ord (Graph e a) where
+instance (Monoid e, Ord a, Ord e) => Ord (Graph e a) where
compare x y = compare (toAdjacencyMap x) (toAdjacencyMap y)
-- | __Note:__ this does not satisfy the usual ring laws; see 'Graph'
diff --git a/src/Algebra/Graph/Labelled/AdjacencyMap.hs b/src/Algebra/Graph/Labelled/AdjacencyMap.hs
index fa812fe..878e3ac 100644
--- a/src/Algebra/Graph/Labelled/AdjacencyMap.hs
+++ b/src/Algebra/Graph/Labelled/AdjacencyMap.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Labelled.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Labelled/Example/Automaton.hs b/src/Algebra/Graph/Labelled/Example/Automaton.hs
index 0e97dd4..35a6fb0 100644
--- a/src/Algebra/Graph/Labelled/Example/Automaton.hs
+++ b/src/Algebra/Graph/Labelled/Example/Automaton.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Labelled.Example.Automaton
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Labelled/Example/Network.hs b/src/Algebra/Graph/Labelled/Example/Network.hs
index dd56d7c..37f0e03 100644
--- a/src/Algebra/Graph/Labelled/Example/Network.hs
+++ b/src/Algebra/Graph/Labelled/Example/Network.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Labelled.Example.Network
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/NonEmpty.hs b/src/Algebra/Graph/NonEmpty.hs
index 143b2fa..f7217d5 100644
--- a/src/Algebra/Graph/NonEmpty.hs
+++ b/src/Algebra/Graph/NonEmpty.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.NonEmpty
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -53,7 +53,6 @@ module Algebra.Graph.NonEmpty (
) where
import Control.DeepSeq
-import Control.Monad
import Control.Monad.Trans.State
import Data.List.NonEmpty (NonEmpty (..))
import Data.String
diff --git a/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs b/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs
index 73fc904..08421e5 100644
--- a/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs
+++ b/src/Algebra/Graph/NonEmpty/AdjacencyMap.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.NonEmpty.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Relation.hs b/src/Algebra/Graph/Relation.hs
index d7028d1..c176745 100644
--- a/src/Algebra/Graph/Relation.hs
+++ b/src/Algebra/Graph/Relation.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Relation
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -46,7 +46,7 @@ import Control.DeepSeq
import Data.Bifunctor
import Data.Set (Set, union)
import Data.String
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import Data.Tuple
import qualified Data.IntSet as IntSet
@@ -54,8 +54,6 @@ import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import qualified Data.Tree as Tree
-import Algebra.Graph.Internal
-
import qualified Algebra.Graph as G
import qualified Algebra.Graph.AdjacencyIntMap as AIM
import qualified Algebra.Graph.AdjacencyMap as AM
diff --git a/src/Algebra/Graph/Relation/Preorder.hs b/src/Algebra/Graph/Relation/Preorder.hs
index db6ecd9..d55f7ee 100644
--- a/src/Algebra/Graph/Relation/Preorder.hs
+++ b/src/Algebra/Graph/Relation/Preorder.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Relation.Preorder
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Relation/Reflexive.hs b/src/Algebra/Graph/Relation/Reflexive.hs
index 2f4f67a..c7aa09c 100644
--- a/src/Algebra/Graph/Relation/Reflexive.hs
+++ b/src/Algebra/Graph/Relation/Reflexive.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Relation.Reflexive
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Relation/Symmetric.hs b/src/Algebra/Graph/Relation/Symmetric.hs
index dab207e..20d1ae7 100644
--- a/src/Algebra/Graph/Relation/Symmetric.hs
+++ b/src/Algebra/Graph/Relation/Symmetric.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Relation.Symmetric
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -45,16 +45,13 @@ import Control.DeepSeq
import Data.Coerce
import Data.Set (Set)
import Data.String
-import Data.Tree
+import Data.Tree (Tree(..), Forest)
import qualified Data.IntSet as IntSet
import qualified Data.Set as Set
-import qualified Algebra.Graph as G
-import qualified Algebra.Graph.AdjacencyIntMap as AIM
-import qualified Algebra.Graph.AdjacencyMap as AM
-import qualified Algebra.Graph.ToGraph as T
-import qualified Algebra.Graph.Relation as R
+import qualified Algebra.Graph.ToGraph as T
+import qualified Algebra.Graph.Relation as R
{-| This data type represents a /symmetric binary relation/ over a set of
elements of type @a@. Symmetric relations satisfy all laws of the
diff --git a/src/Algebra/Graph/Relation/Transitive.hs b/src/Algebra/Graph/Relation/Transitive.hs
index dd9dcde..fa11a0e 100644
--- a/src/Algebra/Graph/Relation/Transitive.hs
+++ b/src/Algebra/Graph/Relation/Transitive.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Relation.Transitive
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/ToGraph.hs b/src/Algebra/Graph/ToGraph.hs
index af30e38..25e8b35 100644
--- a/src/Algebra/Graph/ToGraph.hs
+++ b/src/Algebra/Graph/ToGraph.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.ToGraph
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Algebra/Graph/Undirected.hs b/src/Algebra/Graph/Undirected.hs
index 0a9ef11..5f3f0b9 100644
--- a/src/Algebra/Graph/Undirected.hs
+++ b/src/Algebra/Graph/Undirected.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Undirected
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/src/Data/Graph/Typed.hs b/src/Data/Graph/Typed.hs
index a1e503d..c86770a 100644
--- a/src/Data/Graph/Typed.hs
+++ b/src/Data/Graph/Typed.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Data.Graph.Typed
--- Copyright : (c) Anton Lorenzen, Andrey Mokhov 2016-2022
+-- Copyright : (c) Anton Lorenzen, Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : anfelor@posteo.de, andrey.mokhov@gmail.com
-- Stability : unstable
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
index 0000000..cbe5e8d
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,4 @@
+resolver: nightly-2024-03-01 # ghc-9.8.1
+
+ghc-options:
+ '$everything': -haddock
diff --git a/test/Algebra/Graph/Test.hs b/test/Algebra/Graph/Test.hs
index 7ca061d..fcc92a3 100644
--- a/test/Algebra/Graph/Test.hs
+++ b/test/Algebra/Graph/Test.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/API.hs b/test/Algebra/Graph/Test/API.hs
index 11d67d8..c96edbd 100644
--- a/test/Algebra/Graph/Test/API.hs
+++ b/test/Algebra/Graph/Test/API.hs
@@ -3,7 +3,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.API
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs b/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs
index adee4c7..9bfb0e2 100644
--- a/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/Acyclic/AdjacencyMap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Acyclic.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/AdjacencyIntMap.hs b/test/Algebra/Graph/Test/AdjacencyIntMap.hs
index b1e25cb..981c5d3 100644
--- a/test/Algebra/Graph/Test/AdjacencyIntMap.hs
+++ b/test/Algebra/Graph/Test/AdjacencyIntMap.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.AdjacencyIntMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/AdjacencyMap.hs b/test/Algebra/Graph/Test/AdjacencyMap.hs
index 2751a6f..c1b144e 100644
--- a/test/Algebra/Graph/Test/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/AdjacencyMap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Arbitrary.hs b/test/Algebra/Graph/Test/Arbitrary.hs
index d6b0c7d..be37375 100644
--- a/test/Algebra/Graph/Test/Arbitrary.hs
+++ b/test/Algebra/Graph/Test/Arbitrary.hs
@@ -1,9 +1,8 @@
-{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Arbitrary
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -15,10 +14,8 @@ module Algebra.Graph.Test.Arbitrary (
arbitraryGraph, arbitraryRelation, arbitraryAdjacencyMap,
) where
-import Control.Monad
import Data.List.NonEmpty (NonEmpty (..), toList)
import Data.Maybe (catMaybes)
-import Data.Tree
import Test.QuickCheck
import Algebra.Graph
diff --git a/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs b/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs
index a0b7f29..7c26363 100644
--- a/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/Bipartite/AdjacencyMap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Bipartite.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -20,7 +20,7 @@ import Algebra.Graph.Bipartite.AdjacencyMap.Algorithm
import Algebra.Graph.Test
import Data.Either
import Data.Either.Extra
-import Data.List (nub, sort)
+import Data.List (nub)
import Data.Map.Strict (Map)
import Data.Set (Set)
@@ -30,7 +30,6 @@ import qualified Data.Bifunctor as Bifunctor
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import qualified Data.Tuple
-import qualified Algebra.Graph.Bipartite.AdjacencyMap as B
type AI = AM.AdjacencyMap Int
type AII = AM.AdjacencyMap (Either Int Int)
diff --git a/test/Algebra/Graph/Test/Export.hs b/test/Algebra/Graph/Test/Export.hs
index a036184..90e115a 100644
--- a/test/Algebra/Graph/Test/Export.hs
+++ b/test/Algebra/Graph/Test/Export.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Export
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Generic.hs b/test/Algebra/Graph/Test/Generic.hs
index 62e7564..51f923e 100644
--- a/test/Algebra/Graph/Test/Generic.hs
+++ b/test/Algebra/Graph/Test/Generic.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Generic
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
@@ -13,7 +13,7 @@ module Algebra.Graph.Test.Generic where
import Control.Monad (when)
import Data.Either
-import Data.List (nub, sort)
+import Data.List (nub)
import Data.List.NonEmpty (NonEmpty (..))
import Data.Tree
import Data.Tuple
diff --git a/test/Algebra/Graph/Test/Graph.hs b/test/Algebra/Graph/Test/Graph.hs
index 6ecbeea..c34fc21 100644
--- a/test/Algebra/Graph/Test/Graph.hs
+++ b/test/Algebra/Graph/Test/Graph.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Graph
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Internal.hs b/test/Algebra/Graph/Test/Internal.hs
index 680b9de..2016f8d 100644
--- a/test/Algebra/Graph/Test/Internal.hs
+++ b/test/Algebra/Graph/Test/Internal.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Internal
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Label.hs b/test/Algebra/Graph/Test/Label.hs
index 34cf6ff..441a0a1 100644
--- a/test/Algebra/Graph/Test/Label.hs
+++ b/test/Algebra/Graph/Test/Label.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Label
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs b/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs
index 9ff4127..433ba4d 100644
--- a/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/Labelled/AdjacencyMap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Labelled.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Labelled/Graph.hs b/test/Algebra/Graph/Test/Labelled/Graph.hs
index 4ecb63c..bd79978 100644
--- a/test/Algebra/Graph/Test/Labelled/Graph.hs
+++ b/test/Algebra/Graph/Test/Labelled/Graph.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Labelled.Graph
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs b/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs
index f94c46d..fe00928 100644
--- a/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs
+++ b/test/Algebra/Graph/Test/NonEmpty/AdjacencyMap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.NonEmpty.AdjacencyMap
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/NonEmpty/Graph.hs b/test/Algebra/Graph/Test/NonEmpty/Graph.hs
index 5d25970..0ebfdb3 100644
--- a/test/Algebra/Graph/Test/NonEmpty/Graph.hs
+++ b/test/Algebra/Graph/Test/NonEmpty/Graph.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.NonEmpty.Graph
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Relation.hs b/test/Algebra/Graph/Test/Relation.hs
index 431ac26..72af79f 100644
--- a/test/Algebra/Graph/Test/Relation.hs
+++ b/test/Algebra/Graph/Test/Relation.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Relation
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Relation/Symmetric.hs b/test/Algebra/Graph/Test/Relation/Symmetric.hs
index 3bb12a9..d7b5f9c 100644
--- a/test/Algebra/Graph/Test/Relation/Symmetric.hs
+++ b/test/Algebra/Graph/Test/Relation/Symmetric.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Relation.Symmetric
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/RewriteRules.hs b/test/Algebra/Graph/Test/RewriteRules.hs
index 8b014a7..7a7a63e 100644
--- a/test/Algebra/Graph/Test/RewriteRules.hs
+++ b/test/Algebra/Graph/Test/RewriteRules.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.RewriteRules
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Algebra/Graph/Test/Undirected.hs b/test/Algebra/Graph/Test/Undirected.hs
index e4a6e1d..5d006cd 100644
--- a/test/Algebra/Graph/Test/Undirected.hs
+++ b/test/Algebra/Graph/Test/Undirected.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Undirected
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
diff --git a/test/Data/Graph/Test/Typed.hs b/test/Data/Graph/Test/Typed.hs
index 1a994d6..4403ae7 100644
--- a/test/Data/Graph/Test/Typed.hs
+++ b/test/Data/Graph/Test/Typed.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Data.Graph.Test.Typed
--- Copyright : (c) Andrey Mokhov 2016-2022
+-- Copyright : (c) Andrey Mokhov 2016-2024
-- License : MIT (see the file LICENSE)
-- Maintainer : anfelor@posteo.de, andrey.mokhov@gmail.com
-- Stability : experimental
@@ -20,7 +20,7 @@ import Algebra.Graph.AdjacencyMap ( forest, empty, vertex, edge, vertices
import Data.Array (array)
import Data.Graph.Typed
import Data.Tree
-import Data.List (nub, sort)
+import Data.List (nub)
import qualified Data.Graph as KL
import qualified Data.IntSet as IntSet
diff --git a/aur.cabal b/aur.cabal
index b7130e8..fe8c0cc 100644
index b7130e8..5acb75d 100644
--- a/aur.cabal
+++ b/aur.cabal
@@ -1,6 +1,7 @@
......@@ -10,7 +10,7 @@ index b7130e8..fe8c0cc 100644
synopsis: Access metadata from the Arch Linux User Repository.
description:
Access package information from Arch Linux's AUR via its RPC interface. The
@@ -36,7 +37,7 @@ library
@@ -36,11 +37,11 @@ library
hs-source-dirs: lib
exposed-modules: Linux.Arch.Aur
build-depends:
......@@ -19,3 +19,8 @@ index b7130e8..fe8c0cc 100644
, bytestring
, hashable >= 1.2
, http-types ^>=0.12
- , text ^>=1.2
+ , text >=1.2
test-suite aur-test
import: commons
diff --git a/aura.cabal b/aura.cabal
index 937ba4e..1f51e64 100644
--- a/aura.cabal
+++ b/aura.cabal
@@ -43,14 +43,14 @@ common commons
, base >=4.12 && <5
, bytestring ^>=0.11
, containers ^>=0.6
- , megaparsec >=7 && <10
+ , megaparsec >=7
, rio ^>=0.1.17
, text >=1.2 && < 1.3 || ^>= 2.0
, versions ^>=6.0.3
common libexec
build-depends:
- , aeson >=2.1 && < 2.3
+ , aeson >=2.1
, aur ^>=7.0.5
, http-client >=0.5 && <0.8
, prettyprinter >=1.2 && <1.8
@@ -58,7 +58,7 @@ common libexec
, scheduler >=1.1 && <2.1
, transformers ^>=0.5
, typed-process ^>=0.2
- , unix ^>=2.7.2.2
+ , unix >=2.7.2.2
library
import: commons, libexec
@@ -90,14 +90,14 @@ library
Aura.Utils
build-depends:
- , algebraic-graphs >=0.1 && <0.8
- , filepath ^>=1.4
+ , algebraic-graphs >=0.1
+ , filepath >=1.4
, hashable ^>=1.4
, http-types >=0.9 && <0.13
- , language-bash >=0.8 && <0.10
+ , language-bash >=0.8
, network-uri ^>=2.6
, stm ^>=2.5
- , time >=1.8 && <1.13
+ , time >=1.8
executable aura
import: commons, libexec