← All packages

aihc-cabal-syntax2.0.0.0

Parse Cabal files for aihc

<!-- Generated by scripts/readme.py. Do not edit. -->
# aihc-cabal-syntax

A small Haskell library that parses .cabal files for the aihc compiler. It provides package data, version ranges, and condition evaluation without a runtime dependency on Cabal or Cabal-syntax. It uses Megaparsec. It does not solve dependencies or build packages.

Hackage results

The fixed Hackage index contains 200,642 file revisions. The reference parser is Cabal-syntax 3.18.1.0.

ResultFilesAll files
aihc-cabal-syntax accepts200,642100.00%
Cabal-syntax accepts200,642100.00%
Equal converted data200,642100.00%

An accepted file does not prove full compliance. The equality test compares complete GenericPackageDescription values after conversion of our AST. Conversion limits can also cause differences. This library is not a complete replacement for Cabal-syntax.

Stackage LTS results

The Stackage test uses Stackage LTS 24.38 with 3,370 packages. The pinned Nixpkgs revision supplies the package list. The test uses the last revision of each package version in the fixed Hackage index.

ResultPackagesAll packages
aihc-cabal-syntax accepts3,370100.00%
Cabal-syntax accepts3,370100.00%
Equal converted data3,370100.00%

The Nix check fails if a package in the snapshot does not have equal converted data.

Parse benchmark

Each parser reads all 200,642 revisions in a separate process on the same machine.

Measurementaihc-cabal-syntaxCabal-syntaxaihc / Cabal-syntax
Elapsed time47.64 s132.77 s0.36×
Peak process memory (RSS)23.20 MiB37.56 MiB0.62×

A ratio below 1 means less time or memory than Cabal-syntax. Measured on aarch64-darwin with GHC 9.10.3, -O2, and one RTS capability. Time includes archive input, parsing, and result evaluation through show. The benchmark includes rejected files. It discards each result before the next file. Each parser has one measured run. Machine load and file caching affect the time. The parsers produce different data and accept different numbers of files; these ratios include that difference.

Build and update

nix build --no-update-lock-file
nix flake check --no-update-lock-file
nix run .#update-readme --no-update-lock-file

The update command runs the full comparison and a new benchmark, then writes this README and the measurement data. Nix pins the tools and test data. See test details and API use and limits.

Open the README as plain text ↗

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.