arch-hs: Distribute hackage packages to archlinux

[ distribution, library, mit, program ] [ Propose Tags ]

arch-hs is a command-line program, which simplifies the process of producing and maintaining haskell packages for archlinux distribution by automating the PKGBUILD generation with the dependency resolving and template filling. Currently, arch-hs is unstable, so packagers should not trust it 100%, but always follow the Haskell package guidelines.

[Skip to Readme]


Manual Flags


Whether to use libalpm


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS],,,,,,,,,,,,,,,,,
Change log
Dependencies aeson (>=1.5.4 && <1.6), algebraic-graphs (>=0.5 && <0.6), arch-hs, arch-web (>=0.1.0 && <0.2), base (>=4.12 && <5), bytestring, Cabal (>=3.2 && <3.5), conduit (>=1.3.2 && <1.4), conduit-extra (>=1.3.5 && <1.4), containers, deepseq (>=1.4.4 && <1.5), Diff (>=0.4.0 && <0.5), directory (>=1.3.6 && <1.4), filepath (>=1.4.2 && <1.5), hackage-db (>=2.1.0 && <2.2), http-client, http-client-tls, megaparsec (>=9.0.0 && <9.1), microlens (>=0.4.11 && <0.5), microlens-th (>=0.4.3 && <0.5), neat-interpolation (>=0.5.1 && <0.6), optparse-applicative (>=0.16.0 && <0.17), polysemy, prettyprinter (>=1.7.0 && <1.8), prettyprinter-ansi-terminal (>=1.1.2 && <1.2), servant-client (>=0.18.2 && <0.19), split (>=0.2.3 && <0.3), tar-conduit (>=0.3.2 && <0.4), template-haskell (>=2.16.0 && <2.17), text [details]
License MIT
Copyright (c) 2020-2021 berberman
Author berberman
Maintainer berberman <>
Category Distribution
Home page
Bug tracker
Source repo head: git clone
Uploaded by berberman at 2021-03-28T07:03:51Z
Distributions Arch:, NixOS:
Executables arch-hs-submit, arch-hs-diff, arch-hs
Downloads 2741 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-03-28 [all 1 reports]

Readme for arch-hs-

[back to package description]


Hackage Dependency MIT license

Env CI
pacman (-f alpm) GitHub CI
cabal-install Build Status

A program generating PKGBUILD for hackage packages. Special thanks to felixonmars.

Notice that arch-hs will always support only the latest GHC version used by Arch Linux.


Given the name of a package in hackage, arch-hs can generate PKGBUILD files, not only for the package whose name is given, but also for all dependencies missing in [community]. arch-hs has a naive built-in dependency solver, which can fetch those dependencies and find out which are required to be packaged. During the dependency calculation, all version constraints will be discarded due to the arch haskell packaging strategy, thus there is no guarantee of dependencies' version consistency.


arch-hs is a PKGBUILD text file generator, which is not integrated with pacman(See Alpm Support), depending on nothing than:

  • Pacman databases (community.db, community.files, core.files, and extra.files)

  • Hackage index tarball (01-index.tar, or 00-index.tar previously) -- usually provided by cabal-install


arch-hs is portable, which means it's not restricted to Arch Linux. However, arch-hs can use libalpm to load pacman database on Arch Linux, and if you want to run on other systems, you have to build it from source.

Install the latest release

# pacman -S arch-hs

arch-hs is available in [community], so you can install it using pacman.

Install the development version

# pacman -S arch-hs-git

The -git version is available in [archlinuxcn], following the latest git commit.


$ git clone

Then build it via stack or cabal.


$ stack build

Cabal (dynamic)

$ cabal configure --disable-library-vanilla --enable-shared --enable-executable-dynamic --ghc-options=-dynamic 
$ cabal build


Just run arch-hs in command line with options and a target. Here is an example: we will create the archlinux package of gi-gdk.

$ arch-hs -o ~/test --alpm gi-gdk 
ⓘ Loading hackage from /home/berberman/.cabal/packages/
ⓘ Loading community.db from libalpm
ⓘ Start running...
ⓘ Solved:
Cabal                                       ✔ [community]
ChasingBottoms                              ✔ [community]
Diff                                        ✔ [community]
HUnit                                       ✔ [community]
QuickCheck                                  ✔ [community]
StateVar                                    ✔ [community]
adjunctions                                 ✔ [community]
aeson                                       ✔ [community]
ansi-terminal                               ✔ [community]
ansi-wl-pprint                              ✔ [community]
assoc                                       ✔ [community]
async                                       ✔ [community]
attoparsec                                  ✔ [community]
base-compat                                 ✔ [community]
base-compat-batteries                       ✔ [community]
base-orphans                                ✔ [community]
base16-bytestring                           ✔ [community]
base64-bytestring                           ✔ [community]
bifunctors                                  ✔ [community]
binary                                      ✔ [community]
blaze-builder                               ✔ [community]
blaze-html                                  ✔ [community]
blaze-markup                                ✔ [community]
bytestring                                  ✔ [community]
bytestring-handle                           ✔ [community]
cabal-doctest                               ✔ [community]
call-stack                                  ✔ [community]
case-insensitive                            ✔ [community]
charset                                     ✔ [community]
clock                                       ✔ [community]
code-page                                   ✔ [community]
colour                                      ✔ [community]
comonad                                     ✔ [community]
concurrent-output                           ✔ [community]
conduit                                     ✔ [community]
conduit-extra                               ✔ [community]
constraints                                 ✔ [community]
containers                                  ✔ [community]
contravariant                               ✔ [community]
data-default                                ✔ [community]
data-default-instances-containers           ✔ [community]
data-default-instances-dlist                ✔ [community]
data-default-instances-old-locale           ✔ [community]
data-fix                                    ✔ [community]
deepseq                                     ✔ [community]
directory                                   ✔ [community]
distributive                                ✔ [community]
dlist                                       ✔ [community]
doctest                                     ✔ [community]
exceptions                                  ✔ [community]
filepath                                    ✔ [community]
fingertree                                  ✔ [community]
foldl                                       ✔ [community]
free                                        ✔ [community]
generic-deriving                            ✔ [community]
ghc                                         ✔ [community]
ghc-boot                                    ✔ [community]
ghc-paths                                   ✔ [community]
ghci                                        ✔ [community]
gi-cairo                                    ✔ [community]
gi-gdk                                      ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─gi-cairo (Lib, Setup)                    ✔ [community]
 ├─gi-gdkpixbuf (Lib, Setup)                ✘
 ├─gi-gio (Lib, Setup)                      ✘
 ├─gi-glib (Lib, Setup)                     ✘
 ├─gi-gobject (Lib, Setup)                  ✘
 ├─gi-pango (Lib, Setup)                    ✘
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
gi-gdkpixbuf                                ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─gi-gio (Lib, Setup)                      ✘
 ├─gi-glib (Lib, Setup)                     ✘
 ├─gi-gobject (Lib, Setup)                  ✘
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
gi-gio                                      ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─gi-glib (Lib, Setup)                     ✘
 ├─gi-gobject (Lib, Setup)                  ✘
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
gi-glib                                     ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
gi-gobject                                  ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─gi-glib (Lib, Setup)                     ✘
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
gi-harfbuzz                                 ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─gi-glib (Lib, Setup)                     ✘
 ├─gi-gobject (Lib, Setup)                  ✘
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
gi-pango                                    ✘
 ├─Cabal (Setup)                            ✔ [community]
 ├─bytestring (Lib)                         ✔ [community]
 ├─containers (Lib)                         ✔ [community]
 ├─gi-glib (Lib, Setup)                     ✘
 ├─gi-gobject (Lib, Setup)                  ✘
 ├─gi-harfbuzz (Lib, Setup)                 ✘
 ├─haskell-gi (Lib, Setup)                  ✔ [community]
 ├─haskell-gi-base (Lib)                    ✔ [community]
 ├─haskell-gi-overloading (Lib)             ✔ [community]
 ├─text (Lib)                               ✔ [community]
 └─transformers (Lib)                       ✔ [community]
hashable                                    ✔ [community]
hashable-time                               ✔ [community]
haskell-gi                                  ✔ [community]
haskell-gi-base                             ✔ [community]
haskell-src-exts                            ✔ [community]
hedgehog                                    ✔ [community]
hpc                                         ✔ [community]
hspec                                       ✔ [community]
hspec-core                                  ✔ [community]
hspec-discover                              ✔ [community]
hspec-expectations                          ✔ [community]
hspec-meta                                  ✔ [community]
indexed-traversable                         ✔ [community]
integer-logarithms                          ✔ [community]
invariant                                   ✔ [community]
kan-extensions                              ✔ [community]
lens                                        ✔ [community]
libxml                                      ✔ [community]
lifted-async                                ✔ [community]
lifted-base                                 ✔ [community]
logging-facade                              ✔ [community]
logict                                      ✔ [community]
math-functions                              ✔ [community]
mmorph                                      ✔ [community]
mockery                                     ✔ [community]
monad-control                               ✔ [community]
mono-traversable                            ✔ [community]
mtl                                         ✔ [community]
mwc-random                                  ✔ [community]
nanospec                                    ✔ [community]
network                                     ✔ [community]
optparse-applicative                        ✔ [community]
parallel                                    ✔ [community]
parsec                                      ✔ [community]
parsers                                     ✔ [community]
pcre-light                                  ✔ [community]
pgp-wordlist                                ✔ [community]
pretty                                      ✔ [community]
pretty-show                                 ✔ [community]
prettyprinter                               ✔ [community]
prettyprinter-ansi-terminal                 ✔ [community]
primitive                                   ✔ [community]
process                                     ✔ [community]
profunctors                                 ✔ [community]
quickcheck-classes-base                     ✔ [community]
quickcheck-instances                        ✔ [community]
quickcheck-io                               ✔ [community]
quickcheck-unicode                          ✔ [community]
random                                      ✔ [community]
reducers                                    ✔ [community]
reflection                                  ✔ [community]
regex-base                                  ✔ [community]
regex-posix                                 ✔ [community]
regex-tdfa                                  ✔ [community]
resourcet                                   ✔ [community]
safe                                        ✔ [community]
scientific                                  ✔ [community]
semigroupoids                               ✔ [community]
setenv                                      ✔ [community]
silently                                    ✔ [community]
smallcheck                                  ✔ [community]
split                                       ✔ [community]
splitmix                                    ✔ [community]
stm                                         ✔ [community]
streaming-commons                           ✔ [community]
strict                                      ✔ [community]
stringbuilder                               ✔ [community]
syb                                         ✔ [community]
tagged                                      ✔ [community]
tar                                         ✔ [community]
tasty                                       ✔ [community]
tasty-ant-xml                               ✔ [community]
tasty-expected-failure                      ✔ [community]
tasty-golden                                ✔ [community]
tasty-hedgehog                              ✔ [community]
tasty-hunit                                 ✔ [community]
tasty-quickcheck                            ✔ [community]
tasty-smallcheck                            ✔ [community]
tasty-th                                    ✔ [community]
template-haskell                            ✔ [community]
temporary                                   ✔ [community]
terminal-size                               ✔ [community]
test-framework                              ✔ [community]
test-framework-hunit                        ✔ [community]
test-framework-quickcheck2                  ✔ [community]
text                                        ✔ [community]
tf-random                                   ✔ [community]
th-abstraction                              ✔ [community]
these                                       ✔ [community]
time                                        ✔ [community]
time-compat                                 ✔ [community]
transformers-base                           ✔ [community]
transformers-compat                         ✔ [community]
tree-diff                                   ✔ [community]
trifecta                                    ✔ [community]
typed-process                               ✔ [community]
unix                                        ✔ [community]
unix-compat                                 ✔ [community]
unliftio                                    ✔ [community]
unliftio-core                               ✔ [community]
unordered-containers                        ✔ [community]
utf8-string                                 ✔ [community]
uuid-types                                  ✔ [community]
vector                                      ✔ [community]
vector-algorithms                           ✔ [community]
vector-th-unbox                             ✔ [community]
wcwidth                                     ✔ [community]
wl-pprint-annotated                         ✔ [community]
xdg-basedir                                 ✔ [community]
xml                                         ✔ [community]
xml-conduit                                 ✔ [community]
xml-types                                   ✔ [community]
zlib                                        ✔ [community]
array                                       ✔ [community]
transformers                                ✔ [community]
semigroups                                  ✔ [community]
void                                        ✔ [community]
integer-gmp                                 ✔ [community]
hsc2hs                                      ✔ [community]
type-equality                               ✔ [community]
data-default-class                          ✔ [community]
old-locale                                  ✔ [community]
ghc-boot-th                                 ✔ [community]
terminfo                                    ✔ [community]
haskell-gi-overloading                      ✔ [community]
happy                                       ✔ [community]
erf                                         ✔ [community]
simple-reflect                              ✔ [community]
haskell-lexer                               ✔ [community]
unbounded-delays                            ✔ [community]
hostname                                    ✔ [community]
extensible-exceptions                       ✔ [community]

ⓘ Recommended package order:
1. gi-glib
2. gi-gobject
3. gi-harfbuzz
4. gi-pango
5. gi-gio
6. gi-gdkpixbuf
7. gi-gdk

ⓘ Detected pkgconfig or extraLib from target(s):
gi-gdk:      gtk4.pc
gi-gio:      gio-2.0.pc
gi-glib:     glib-2.0.pc
gi-gobject:  gobject-2.0.pc
gi-harfbuzz: harfbuzz.pc, harfbuzz-gobject.pc
gi-pango:    pango.pc

ⓘ Now finding corresponding system package(s) using files db:
ⓘ Loading [core] files from libalpm
ⓘ Loading [extra] files from libalpm
ⓘ Done:
gtk4.pc               ⇒   gtk4
gdk-pixbuf-2.0.pc     ⇒   gdk-pixbuf2
gio-2.0.pc            ⇒   glib2
glib-2.0.pc           ⇒   glib2
gobject-2.0.pc        ⇒   glib2
harfbuzz.pc           ⇒   harfbuzz
harfbuzz-gobject.pc   ⇒   harfbuzz
pango.pc              ⇒   pango

ⓘ Write file: /home/berberman/test/haskell-gi-gdk/PKGBUILD
ⓘ Write file: /home/berberman/test/haskell-gi-gdkpixbuf/PKGBUILD
ⓘ Write file: /home/berberman/test/haskell-gi-gio/PKGBUILD
ⓘ Write file: /home/berberman/test/haskell-gi-glib/PKGBUILD
ⓘ Write file: /home/berberman/test/haskell-gi-gobject/PKGBUILD
ⓘ Write file: /home/berberman/test/haskell-gi-harfbuzz/PKGBUILD
ⓘ Write file: /home/berberman/test/haskell-gi-pango/PKGBUILD
✔ Success!

This output tells us that in order to package gi-gdk, we must package its dependencies listed in package order, which are not present in [community] repo. Particularly, gi-gdk requires external system dependencies, so arch-hs can map them to system packages using files db.

$ tree ~/test
├── haskell-gi-gdk
│   └── PKGBUILD
├── haskell-gi-gdkpixbuf
│   └── PKGBUILD
├── haskell-gi-gio
│   └── PKGBUILD
├── haskell-gi-glib
│   └── PKGBUILD
├── haskell-gi-gobject
│   └── PKGBUILD
├── haskell-gi-harfbuzz
│   └── PKGBUILD
└── haskell-gi-pango
    └── PKGBUILD

arch-hs generates PKGBUILD for each package. Let's see what we have in ./haskell-gi-harfbuzz/PKGBUILD:

# This file was generated by, please check it manually.
# Maintainer: Your Name <>

pkgdesc="HarfBuzz bindings"
depends=('ghc-libs' 'haskell-gi-glib' 'haskell-gi-gobject' 'haskell-gi' 'haskell-gi-base' 'haskell-gi-overloading' 'harfbuzz')

build() {
  cd $_hkgname-$pkgver

  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
    --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \

  runhaskell Setup build
  runhaskell Setup register --gen-script
  runhaskell Setup unregister --gen-script
  sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |"
  sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |"

package() {
  cd $_hkgname-$pkgver

  install -D -m744 "$pkgdir"/usr/share/haskell/register/$
  install -D -m744 "$pkgdir"/usr/share/haskell/unregister/$
  runhaskell Setup copy --destdir="$pkgdir"
  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE

arch-hs will collect the information from hackage db, and apply it into a fixed template after some processing steps including renaming, matching license, and filling out dependencies etc. However, packaging haven't been done so far. arch-hs can't guarantee that this package can be built by ghc with the latest dependencies; hence some patchs may be required in prepare(), such as uusi.



$ arch-hs -o ~/test TARGET

Using -o can generate a series of PKGBUILD including TARGET with its dependencies into the output dir. If you don't pass it, only dependency calculation will occur.

Flag Assignments

$ arch-hs -f TARGET:FLAG_A:true TARGET

Using -f can pass flags, which may affect the results of resolving.

AUR Searching

$ arch-hs -a TARGET

With -a, arch-hs will regard AUR as another package provider, and it will try to search missing packages in AUR as well.

Skipping Components


Using -s can force skip runnable components in dependency resolving. This is useful when a package doesn't provide flag to disable its runnables, which will be built by default but are trivial in system level packaging. Notice that this only makes sense in the lifetime of arch-hs, whereas generated PKGBUILD and actual build processes will not be affected.

Extra Cabal Files

$ arch-hs -e ~/TARGET/TARGET.cabal TARGET

For Testing Purposes Only

Using -e can include extra .cabal files as supplementary. Useful when the TARGET hasn't been released to hackage.


$ arch-hs --trace TARGET

With --trace, arch-hs can print the process of dependency resolving into stdout.

$ arch-hs --trace-file foo.log TARGET

Similar to --trace, but the log will be written into a file.


$ arch-hs -o ~/test --uusi TARGET

With --uusi, arch-hs will generate following snippet for each package:

prepare() {
  uusi $_hkgname-$pkgver/$_hkgname.cabal

See uusi for details.


$ arch-hs --alpm TARGET

See Alpm Support.


$ arch-hs --force TARGET

With --force, arch-hs will try to package even if the target is provided.


$ arch-hs --json ./output.json TARGET

With --json, arch-hs will dump information presented in stdout to file as JSON format, including:

  • abnormal dependencies
  • solved packages
  • recommended package order
  • system dependencies
  • flags

Name preset

To distribute a haskell package to archlinux, the name of package should be changed according to the naming convention:

  • for haskell libraries, their names must have haskell- prefix

  • for programs, it depends on circumstances

  • names should always be in lower case

However, it's not enough to prefix the string with haskell- and transform to lower case; in some special situations, the hackage name may have haskell- prefix already, or the case is irregular, thus we have to a name preset manually. Once a package distributed to archlinux, whose name conform to above-mentioned situation, the name preset should be upgraded correspondingly.


arch-hs also provides a component called arch-hs-diff. arch-hs-diff can show the differences of package description between two versions of a package, and remind us if some required packages in community repo can't satisfy the version constraints, or they are non-existent. This is useful in the subsequent maintenance of a package. For example:

$ arch-hs-diff --alpm comonad 5.0.6 5.0.7
ⓘ Loading community.db from libalpm
ⓘ Start running...
ⓘ Downloading cabal file from
ⓘ Downloading cabal file from
Package: comonad
Version: 5.0.6  ⇒  5.0.7
Synopsis: Comonads
  base  >=4 && <5
  containers  >=0.3 && <0.7
  distributive  >=0.2.2 && <1
  tagged  >=0.7 && <1
  transformers  >=0.2 && <0.6
  transformers-compat  >=0.3 && <1
  base  >=4 && <5
  containers  >=0.3 && <0.7
  distributive  >=0.2.2 && <1
  indexed-traversable  >=0.1 && <0.2
  tagged  >=0.7 && <1
  transformers  >=0.2 && <0.6
  transformers-compat  >=0.3 && <1
  base  -any
  doctest  >=0.11.1 && <0.17
  base  -any
  doctest  >=0.11.1 && <0.18
"doctest" is required to be in range (>=0.11.1 && <0.17), but [community] provides (0.17). 
    ⚐ test-doctests:
        default: True
        isManual: True
    ⚐ containers:
          You can disable the use of the `containers` package using `-f-containers`.

          Disabing this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
        default: True
        isManual: True
    ⚐ distributive:
          You can disable the use of the `distributive` package using `-f-distributive`.

          Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.

          If disabled we will not supply instances of `Distributive`

        default: True
        isManual: True
    ⚐ test-doctests:
        default: True
        isManual: True
    ⚐ containers:
          You can disable the use of the `containers` package using `-f-containers`.

          Disabing this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
        default: True
        isManual: True
    ⚐ distributive:
          You can disable the use of the `distributive` package using `-f-distributive`.

          Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.

          If disabled we will not supply instances of `Distributive`

        default: True
        isManual: True
    ⚐ indexed-traversable:
          You can disable the use of the `indexed-traversable` package using `-f-indexed-traversable`.

          Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.

          If disabled we will not supply instances of `FunctorWithIndex`

        default: True
        isManual: True
✔ Success!

arch-hs-diff does not require hackage db, it downloads cabal files from hackage server instead.


For hackage distribution maintainers only.


  • arch-hs will run into error, if solved targets contain cycle. Indeed, circular dependency lies ubiquitously in hackage because of tests, but basic cycles are resolved manually in [community] by maintainers. So after the provider simplification, arch-hs can eliminate these cycles. Nevertheless, if the target introduces new cycle or it dependens on a package in an unknown cycle, arch-hs will throw CyclicExist exception.

  • arch-hs is not able to handle with complicated situations: the libraries of a package partially exist in hackage, some libraries include external sources, etc.

  • arch-hs's functionality is limited to dependency processing, whereas necessary procedures like file patches, version range processes, etc. They need to be done manually, so DO NOT give too much trust in generated PKGBUILD files.

Alpm Support

alpm is Arch Linux Package Management library. When running on Arch Linux, loading community.db and files dbs through this library is slightly faster than using the internal parser of arch-hs. Thus, arch-hs provides a flag alpm to enable this feature:

cabal build -f alpm

This flag is enabled by default in arch-hs Arch Linux package. Compiled with alpm, arch-hs can accept runtime flag --alpm. That said, if you want to use alpm to boost arch-hs, you need compile arch-hs with cabal flag alpm, and pass --aplm to arch-hs when running.

When alpm is enabled, arch-hs will lose the capability of specifying the path of community.db and directory of files db.


Issues and PRs are always welcome. _(:з」∠)_