Project Layout
The repository contains these sources and generated trees:
CMakeLists.txt,pyproject.tomlThe native build and the scikit-build-core wheel metadata.
make stageconfigures, builds and installs; its CMake cache is underobject-root.Makefile,AGENTS.md,CONTRIBUTING.md,LICENSEThe build wrapper, project instructions, contribution guide and license.
README.md,README.pypi.md,VERSIONThe README of the repository, the page of the PyPI distribution, and the version of the distribution.
assets/The logo: the mark, the wordmark, the lockup, the animated burst, the palette and the generator.
assets/logo/README.mddescribes them.conda/The scaffold of a conda package: a recipe for Sprite and one for the Curry front end.
conda/README.mddescribes them and what remains open. Nothing is published.contrib/Editor support outside the package:
vim/syntax/spritelog.vimand itsftdetectfile highlight the computation traces of a runtime built withTRACE=ON.curry/The built-in Curry library.
curry/lib/holds the sources: a copy of the library of the pinned PAKCS release, Sprite’s own modules, the license of the origin and the pinned ICurry products. Seecurry/README.md.docs/The Sphinx sources. After
make stage,make -C docs htmlbuilds HTML intoobject-root/docs/html(Developer Setup).examples/The numbered lessons (Examples).
extern/External projects used by Sprite, as Git submodules:
pybind11andlibtommathare needed by the build,mpsby the optional collector. Rungit submodule update --init extern/pybind11 extern/libtommathbefore the first build.frontend/The packaging of the Curry front end as the distribution
curry-frontend: the build script, the source and compiler pins, the patches and the parity check.frontend/README.mddescribes it.getsprite,getsprite-iThe one-line installers; see Installation.
scripts/Scripts called by the build:
build-package.py,install-package.py,overlay.pyandcheck-prereqs.py. Alsolibrary_pins.py,new-worktree.sh, wheel checks underwheels/andsetup-dev-machine.sh(Developer Setup).src/The Sprite source code.
export/Files exported to the installation directory.
python/The Python code implementing Sprite.
curryrt/Source code of the Sprite runtime libraries.
tests/The test suite. See
tests/READMEfor help running tests.data/The test data. This includes Curry source files, text (data) files, and expected results.
func_*.pyFunctional tests. These run whole Curry programs and check their output against another Curry system.
lib/Test support code. The
cytestsubdirectory contains useful extensions to Python’sunittestmodule for testing Curry programs.oracle*Driver scripts for Curry oracles. An oracle is a Curry system such as PAKCS or KiCS2 that generates the expected output of a Curry program. Functional tests validate Sprite by comparing its output to that of an oracle.
run_testsThe test driver. Used to run tests.
unit_*.pyUnit tests. These test isolated components of Sprite.
overlay/The overlay archives, one per supported version of PAKCS: the prebuilt ICurry and FlatCurry files of the test programs. Run
make overlayto apply the overlay. The archive also holds the FlatCurry interfaces of the Curry library. The oracle tests of the FlatCurry-to-ICurry port read them; see The Curry Compilation Pipeline. The ICurry products of the library itself are committed undercurry/lib.
install/(dynamically created)The staged installation that
make stagewrites; the tests and documentation build read it. Delete it to remove the staged tree.make installfollows the same layout.bin/Public commands installed by Sprite.
curry/The Curry home returned by
Curry.Compiler.Distribution.installDir. In a wheel it iscurry/_sprite/curry/within site-packages.curry/bin/Private
curry,cleancurry,sprite-frontendandcypmlaunchers for CPM tools. Thecypmlauncher uses the configured PAKCS installation’s CPM executable or one available on PATH, selecting Sprite unless the caller suppliesCURRYBIN.curry/lib/The built-in Curry library, automatically appended to Sprite’s module search path. Runtime products stay beside their sources. Stock analysis readers use
.fcy,.fintand.acyproducts undercurry/lib/.curry/sprite-<major>.<minor>.<revision>/, with hierarchical module names represented as directories. These products ship in wheels and can be read without writing into the installation.include/The headers of the runtime, which the generated code of a module includes.
lib/The Sprite runtime libraries. The contents of this directory are needed to run programs compiled by Sprite.
licenses/The licenses of the vendored components.
python/The Sprite Python API. Contains the code loaded by the Python statement
import curry.sysconfig/System variables set during configuration.
tools/Links to external programs used by Sprite.
object-root/(dynamically created)Build products: the CMake cache, object files, libraries and built documentation. Delete it for a clean build.
Python package structure
The modules under src/python/ implement the curry package.
Using the API describes its public surface. Internal
modules include:
backends/The
IBackendinterface, itscxximplementation and shared code.cache.pyThe cache of the Curry-to-ICurry step.
common.py,config.py,exceptions.pyShared definitions, installation configuration and public exceptions.
icurry/The Python classes of ICurry, the intermediate language of the compiler.
inspect/Predicates and metadata access for modules, terms and generated code.
interpreter/Sessions, flags and the operations behind the top-level API.
lib/The import hook for Curry modules.
objects/Modules, terms and converted values returned by the public API.
show.pyConversion of Curry values to text.
toolchain/The compilation pipeline and external tools.
tools/sprite-make and the REPL; sprite-exec lives in
__main__.py.typecheck/The typed boundary: schemes, defaulting, goals,
engine,builderand the type-error catalog.utility/General-purpose code.