Full Code of morloc-project/morloc for AI

master cc330baae2e1 cached
2281 files
3.9 MB
1.1M tokens
2679 symbols
1 requests
Download .txt
Showing preview only (4,558K chars total). Download the full file or copy to clipboard to get everything.
Repository: morloc-project/morloc
Branch: master
Commit: cc330baae2e1
Files: 2281
Total size: 3.9 MB

Directory structure:
gitextract_3x8i50ut/

├── .dockerignore
├── .github/
│   └── workflows/
│       ├── release.yml
│       └── test.yml
├── .gitignore
├── ChangeLog.md
├── LICENSE
├── README.md
├── bench/
│   ├── Bench.hs
│   └── test-data/
│       ├── complex-types.loc
│       ├── interop.loc
│       └── simple.loc
├── container/
│   ├── Makefile
│   ├── full/
│   │   ├── Dockerfile
│   │   └── assets/
│   │       ├── README
│   │       ├── bashrc
│   │       └── vimrc
│   ├── static-build/
│   │   ├── Dockerfile
│   │   └── build.sh
│   ├── test/
│   │   ├── Dockerfile
│   │   └── assets/
│   │       └── bashrc
│   └── tiny/
│       └── Dockerfile
├── data/
│   ├── lang/
│   │   ├── c/
│   │   │   └── lang.yaml
│   │   ├── cpp/
│   │   │   ├── cppmorloc.cpp
│   │   │   ├── cppmorloc.hpp
│   │   │   ├── init.sh
│   │   │   ├── lang.yaml
│   │   │   ├── mlc_arrow.hpp
│   │   │   ├── mlc_tensor.hpp
│   │   │   ├── morloc_pch.hpp
│   │   │   ├── nanoarrow/
│   │   │   │   ├── nanoarrow.c
│   │   │   │   └── nanoarrow.h
│   │   │   └── pool.cpp
│   │   ├── julia/
│   │   │   ├── MorlocRuntime.jl
│   │   │   ├── init.sh
│   │   │   ├── juliabridge.c
│   │   │   ├── lang.yaml
│   │   │   └── pool.jl
│   │   ├── languages.yaml
│   │   ├── py/
│   │   │   ├── Makefile
│   │   │   ├── init.sh
│   │   │   ├── lang.yaml
│   │   │   ├── pool.py
│   │   │   ├── pymorloc.c
│   │   │   └── setup.py
│   │   └── r/
│   │       ├── init.sh
│   │       ├── lang.yaml
│   │       ├── pool.R
│   │       └── rmorloc.c
│   ├── misc/
│   │   └── mlccpptypes.hpp
│   ├── morloc/
│   │   └── morloc.h
│   └── rust/
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── morloc-manager/
│       │   ├── Cargo.toml
│       │   └── src/
│       │       ├── config.rs
│       │       ├── container.rs
│       │       ├── doctor.rs
│       │       ├── environment.rs
│       │       ├── error.rs
│       │       ├── freeze.rs
│       │       ├── main.rs
│       │       ├── selinux.rs
│       │       ├── serve.rs
│       │       └── types.rs
│       ├── morloc-manifest/
│       │   ├── Cargo.toml
│       │   └── src/
│       │       └── lib.rs
│       ├── morloc-nexus/
│       │   ├── Cargo.toml
│       │   ├── build.rs
│       │   └── src/
│       │       ├── dispatch.rs
│       │       ├── help.rs
│       │       ├── main.rs
│       │       ├── manifest.rs
│       │       └── process.rs
│       └── morloc-runtime/
│           ├── Cargo.toml
│           ├── build.rs
│           ├── cbindgen.toml
│           └── src/
│               ├── arrow_ffi.rs
│               ├── cache.rs
│               ├── cli.rs
│               ├── cschema.rs
│               ├── daemon_ffi.rs
│               ├── error.rs
│               ├── eval_ffi.rs
│               ├── ffi.rs
│               ├── hash.rs
│               ├── http_ffi.rs
│               ├── intrinsics.rs
│               ├── ipc.rs
│               ├── ipc_ffi.rs
│               ├── json.rs
│               ├── json_ffi.rs
│               ├── lib.rs
│               ├── manifest_ffi.rs
│               ├── mpack.rs
│               ├── packet.rs
│               ├── packet_ffi.rs
│               ├── pool_ffi.rs
│               ├── router_ffi.rs
│               ├── schema.rs
│               ├── shm.rs
│               ├── slurm_ffi.rs
│               ├── utility.rs
│               └── voidstar.rs
├── exe/
│   └── morloc-codegen-generic/
│       └── Main.hs
├── executable/
│   ├── CppPrinter.hs
│   ├── CppTranslator.hs
│   ├── Main.hs
│   ├── Subcommands.hs
│   └── UI.hs
├── fourmolu.yaml
├── hie.yaml
├── library/
│   ├── Morloc/
│   │   ├── BaseTypes.hs
│   │   ├── CodeGenerator/
│   │   │   ├── Docstrings.hs
│   │   │   ├── Emit.hs
│   │   │   ├── Express.hs
│   │   │   ├── Grammars/
│   │   │   │   ├── Common.hs
│   │   │   │   ├── Macro.hs
│   │   │   │   └── Translator/
│   │   │   │       ├── Generic.hs
│   │   │   │       ├── Imperative.hs
│   │   │   │       └── PseudoCode.hs
│   │   │   ├── Infer.hs
│   │   │   ├── LambdaEval.hs
│   │   │   ├── LanguageDescriptor.hs
│   │   │   ├── Namespace.hs
│   │   │   ├── Nexus.hs
│   │   │   ├── Parameterize.hs
│   │   │   ├── Realize.hs
│   │   │   ├── Reduce.hs
│   │   │   ├── Segment.hs
│   │   │   ├── Serial.hs
│   │   │   ├── Serialize.hs
│   │   │   └── SystemConfig.hs
│   │   ├── Completion.hs
│   │   ├── Config.hs
│   │   ├── Data/
│   │   │   ├── Annotated.hs
│   │   │   ├── Bifoldable.hs
│   │   │   ├── Bifunctor.hs
│   │   │   ├── DAG.hs
│   │   │   ├── Doc.hs
│   │   │   ├── GMap.hs
│   │   │   ├── Json.hs
│   │   │   ├── Map/
│   │   │   │   └── Extra.hs
│   │   │   ├── Map.hs
│   │   │   └── Text.hs
│   │   ├── DataFiles.hs
│   │   ├── Frontend/
│   │   │   ├── API.hs
│   │   │   ├── AST.hs
│   │   │   ├── CST.hs
│   │   │   ├── Desugar.hs
│   │   │   ├── Lexer.hs
│   │   │   ├── Link.hs
│   │   │   ├── Merge.hs
│   │   │   ├── Namespace.hs
│   │   │   ├── Parser.hs
│   │   │   ├── Parser.y
│   │   │   ├── Restructure.hs
│   │   │   ├── Token.hs
│   │   │   ├── Treeify.hs
│   │   │   ├── Typecheck.hs
│   │   │   └── Valuecheck.hs
│   │   ├── Internal.hs
│   │   ├── LangRegistry.hs
│   │   ├── Language.hs
│   │   ├── Module.hs
│   │   ├── Monad.hs
│   │   ├── Namespace/
│   │   │   ├── Expr.hs
│   │   │   ├── Prim.hs
│   │   │   ├── State.hs
│   │   │   └── Type.hs
│   │   ├── ProgramBuilder/
│   │   │   ├── Build.hs
│   │   │   └── Install.hs
│   │   ├── Quasi.hs
│   │   ├── System.hs
│   │   ├── TypeEval.hs
│   │   ├── Typecheck/
│   │   │   ├── Internal.hs
│   │   │   └── NatSolver.hs
│   │   └── Version.hs
│   └── Morloc.hs
├── metrics/
│   ├── README.md
│   └── scripts/
│       ├── collect-metrics.sh
│       └── compare-metrics.sh
├── package.yaml
├── scripts/
│   ├── build-rust.sh
│   └── bump-version.sh
├── spec/
│   ├── SPEC.md
│   ├── compiler/
│   │   ├── COMPILER.md
│   │   ├── build.md
│   │   ├── codegen.md
│   │   ├── parsing.md
│   │   ├── pipeline.md
│   │   └── typechecking.md
│   ├── interop/
│   │   ├── INTEROP.md
│   │   ├── foreign-functions.md
│   │   ├── implementation-selection.md
│   │   ├── serialization.md
│   │   └── type-mappings.md
│   ├── language/
│   │   ├── LANGUAGE.md
│   │   ├── annotations.md
│   │   ├── declarations.md
│   │   ├── expressions.md
│   │   ├── lexical-structure.md
│   │   └── operators.md
│   ├── modules/
│   │   ├── MODULES.md
│   │   ├── imports-and-exports.md
│   │   ├── packages.md
│   │   └── resolution.md
│   ├── runtime/
│   │   ├── RUNTIME.md
│   │   ├── cli.md
│   │   ├── execution-model.md
│   │   ├── ipc.md
│   │   └── manifest.md
│   └── types/
│       ├── TYPES.md
│       ├── inference.md
│       ├── polymorphism.md
│       ├── primitive-types.md
│       ├── records.md
│       ├── subtyping.md
│       ├── type-declarations.md
│       └── typeclasses.md
├── stack.yaml
└── test-suite/
    ├── .gitignore
    ├── GoldenMakefileTests.hs
    ├── Main.hs
    ├── PropertyTests.hs
    ├── UnitTypeTests.hs
    ├── cmorloc-tests/
    │   ├── Makefile
    │   ├── test.c
    │   └── test.h
    ├── concurrency-tests/
    │   ├── bidi-py-r.loc
    │   ├── bidi-r-py.loc
    │   ├── concurrent-uni.loc
    │   ├── deep-callback.loc
    │   ├── helpers/
    │   │   ├── py_funcs.py
    │   │   └── r_funcs.R
    │   └── run-tests.sh
    ├── daemon-tests/
    │   ├── arithmetic.loc
    │   ├── helpers.py
    │   ├── pure.loc
    │   ├── run-tests.sh
    │   └── strings.loc
    ├── error-message-tests/
    │   ├── README
    │   ├── bad-source/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── cyclical-import/
    │   │   └── foo.loc
    │   ├── list-error-1/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── missing-import-module/
    │   │   └── foo.loc
    │   ├── missing-import-term/
    │   │   ├── barm.loc
    │   │   └── main.loc
    │   ├── pool-crash-cpp/
    │   │   ├── Makefile
    │   │   ├── foo.hpp
    │   │   ├── main
    │   │   └── main.loc
    │   ├── runtime-error-cpp/
    │   │   ├── Makefile
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── runtime-error-cross-lang/
    │   │   ├── Makefile
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── runtime-error-py/
    │   │   ├── Makefile
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── runtime-error-r/
    │   │   ├── Makefile
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── term-masking/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   ├── typechecking-1/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── typechecking-2/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── typeclass-bad-instance/
    │   │   └── foo.loc
    │   ├── typeclass-bad-instance-expr/
    │   │   └── foo.loc
    │   ├── typeclass-masking/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   ├── typeclass-monomorphic-conflict/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   ├── typeclass-overlap/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   └── undefined-term/
    │       ├── Makefile
    │       └── foo.loc
    ├── executable-benchmark/
    │   ├── .gitignore
    │   ├── README
    │   ├── distributed/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── foo.cpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── main.yaml
    │   ├── parallel-interop/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── parallel.py
    │   │   └── test.sh
    │   └── serial-interop/
    │       ├── .gitignore
    │       ├── Makefile
    │       ├── foo.R
    │       ├── foo.hpp
    │       ├── foo.loc
    │       ├── foo.py
    │       ├── long-list.json
    │       ├── medium-list.json
    │       └── test.sh
    ├── golden-tests/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── alias-array-monoid/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-concrete-bugs/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-constructor-equiv/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-dedup-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-no-cross-instance/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-3-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-3-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-3-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-4-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-4-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-4-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-5-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-5-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-5-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-6-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-6-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-6-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-7-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-7-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-7-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-8-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-8-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-8-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── arrow-immutable-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── arrow-immutable-pc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── arrow-immutable-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── arrow-immutable-rp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── arrow-nexus-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── arrow-nexus-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.py
    │   ├── bare-selector-args/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── bare-selector-chain/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── bug-intrinsic-schema-crash/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── bug-load-type-infer/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-10/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── sequence_align.hpp
    │   │   ├── sequence_io.py
    │   │   └── sequence_stats.R
    │   ├── claude-test-11/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── sysinfo.R
    │   │   ├── sysinfo.hpp
    │   │   └── sysinfo.py
    │   ├── claude-test-12/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-13/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── stress.hpp
    │   │   └── stress.py
    │   ├── claude-test-14/
    │   │   ├── Makefile
    │   │   ├── edge.hpp
    │   │   ├── edge.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-15/
    │   │   ├── Makefile
    │   │   ├── bigdata.hpp
    │   │   ├── bigdata.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-16/
    │   │   ├── Makefile
    │   │   ├── cstress.hpp
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── pstress.py
    │   ├── claude-test-17/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-18/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-19/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-20/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── game.hpp
    │   │   ├── game.py
    │   │   ├── main.loc
    │   │   └── package.yaml
    │   ├── claude-test-6/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── filters.hpp
    │   │   ├── image_io.py
    │   │   ├── main.loc
    │   │   └── stats.R
    │   ├── claude-test-7/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── aggregations.hpp
    │   │   ├── data_io.py
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── statistics.R
    │   ├── claude-test-8/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── string_ops.hpp
    │   │   ├── text_processing.py
    │   │   └── text_stats.R
    │   ├── claude-test-9/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── finance_stats.R
    │   │   ├── helpers.py
    │   │   ├── main.loc
    │   │   ├── market_io.py
    │   │   ├── monte_carlo.hpp
    │   │   └── test-map.loc
    │   ├── command-groups/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── composition/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── paste.py
    │   ├── demo-trimming/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── config.json
    │   │   ├── example.fastq
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── edge-cases-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── edge-cases-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── effect-accumulate-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── effect-coerce-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── effect-coerce-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── effect-error-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── effect-multi-label-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── effect-subtype-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── errors/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── eta-reduction-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-8-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── eta-reduction-8-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── eval-restrict-source/
    │   │   ├── Makefile
    │   │   └── exp.txt
    │   ├── feature-integration-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── file-input-c/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── main.loc
    │   │   └── run.sh
    │   ├── file-input-py/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── run.sh
    │   ├── file-input-r/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── main.loc
    │   │   └── run.sh
    │   ├── force-inline-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── formatting/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── functional-data-1/
    │   │   ├── Makefile
    │   │   ├── bar.py
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── functional-data-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── functional-data-3a/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── functional-data-3b/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.hpp
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3d/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3d-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.hpp
    │   │   └── main.loc
    │   ├── functional-data-3d-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3d-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.R
    │   │   └── main.loc
    │   ├── functional-data-3e/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3f/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── generic-hofs-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── generic-hofs-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── guards-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-inline-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-let-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-let-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-let-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── higher-kinded-types/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── notes
    │   ├── hofs-1/
    │   │   ├── Makefile
    │   │   ├── eq.py
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── holes-func/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── holes-record/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── holes-simple/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── import-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── import-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── localmap/
    │   │   │   ├── main.loc
    │   │   │   └── main.py
    │   │   └── main.loc
    │   ├── infix/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── impl.py
    │   │   └── main.loc
    │   ├── infix-generic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── infix-import/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── ops/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-local-fixity/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── ops-a/
    │   │   │   ├── main.loc
    │   │   │   └── ops.py
    │   │   └── ops-b/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-polyglot/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── ops/
    │   │   │   └── main.loc
    │   │   ├── ops-cpp/
    │   │   │   ├── main.loc
    │   │   │   └── ops.hpp
    │   │   └── ops-py/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-typeclass-import/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── numops/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-typeclass-polyglot/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── semiring/
    │   │   │   └── main.loc
    │   │   ├── semiring-cpp/
    │   │   │   ├── main.loc
    │   │   │   └── ops.hpp
    │   │   └── semiring-py/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-typeclass-simple/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-block-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-cross-lang/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-deep-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-func-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-ho-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-mixed-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-old-style-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-op-ho-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-op-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-typeclass-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── ops.py
    │   ├── interop-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── interop-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── interop-10/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── interop-11/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── incdef.hpp
    │   │   ├── main.loc
    │   │   └── pysum.py
    │   ├── interop-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3a-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3a-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   └── main.loc
    │   ├── interop-3a-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3a-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3f/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── interop-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   └── main.loc
    │   ├── interop-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── interop-8-py-to-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── interop-8-r-to-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── interop-8-r-to-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── interop-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── intrinsic-agnostic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── hello.json
    │   │   └── main.loc
    │   ├── intrinsic-constants/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── intrinsic-hash/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── intrinsic-show-ho-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── intrinsic-show-read/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── intrinsic-show-read-nexus/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── let-crosslang/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── f.hpp
    │   │   ├── f.py
    │   │   └── main.loc
    │   ├── let-expressions/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── local-import-cousin-py/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   └── baz/
    │   │   │       ├── main.loc
    │   │   │       └── main.py
    │   │   ├── bif/
    │   │   │   └── biz/
    │   │   │       ├── main.loc
    │   │   │       └── main.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── local-import-nested-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── lib/
    │   │   │   └── math/
    │   │   │       ├── main.loc
    │   │   │       └── main.py
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   ├── util.loc
    │   │   └── util.py
    │   ├── local-import-root-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── root/
    │   │       ├── main.loc
    │   │       └── main.py
    │   ├── manifold-form-0/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t0.loc
    │   ├── manifold-form-0x/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── manifold-form-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t1.loc
    │   ├── manifold-form-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t2.loc
    │   ├── manifold-form-2x/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t2.loc
    │   ├── manifold-form-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t3.loc
    │   ├── manifold-form-3x/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t3.loc
    │   ├── manifold-form-4_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t4.loc
    │   ├── manifold-form-4_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t4.loc
    │   ├── manifold-form-4_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── manifold-form-5_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t5.loc
    │   ├── manifold-form-5_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t5.loc
    │   ├── manifold-form-5_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t5.loc
    │   ├── manifold-form-6_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t6.loc
    │   ├── manifold-form-6_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t6.loc
    │   ├── manifold-form-6_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t6.loc
    │   ├── manifold-form-7_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t7.loc
    │   ├── manifold-form-7_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t7.loc
    │   ├── manifold-form-7_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t7.loc
    │   ├── memory-interop-misalign-cp/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── memory-nested-misalign-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── memory-nested-misalign-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── memory-optional-double-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── memory-optional-double-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── memory-record-pack-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── memory-record-pack-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── memory-split-block-cpp/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── module-form-00n/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-011/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-01n/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-0n0/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-0n1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-101/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-10n/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-110/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-111/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-1n0/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-n00/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-n01/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-n10/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── multi-lang-mempty-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── multiple-instances-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.h
    │   ├── multiple-instances-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.py
    │   ├── multiple-instances-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.R
    │   ├── multiple-instances-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.h
    │   ├── multiple-instances-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.py
    │   ├── multiple-instances-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── rms.R
    │   │   └── rms.py
    │   ├── multiprocessing-py-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── namespace-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-disambiguation/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-composition/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-double-import/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-exported/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-guard/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-hof/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-let/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-multi/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── mod-a.loc
    │   │   ├── mod-b.loc
    │   │   └── mod-c.loc
    │   ├── namespace-ns-nested-getter/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-reexport/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   ├── main.loc
    │   │   └── middle.loc
    │   ├── namespace-ns-same-func-name/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-shadow/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-unqualified/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-selective/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-separate-impls/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── mod-a.loc
    │   │   └── mod-b.loc
    │   ├── nat-typecheck/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── native-morloc-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── native-morloc-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── native-morloc-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── high.loc
    │   │   └── high.py
    │   ├── native-morloc-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── native-morloc-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-8/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── nexus-let-lambda/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── nexus-let-pure/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── null-keyword/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.R
    │   │   ├── main.hpp
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── numeric-literals/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── object-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.h
    │   ├── object-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.py
    │   ├── object-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.R
    │   ├── optional-coerce-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── optional-coerce-interop/
    │   │   ├── Makefile
    │   │   ├── cfoo.hpp
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── pfoo.py
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── optional-coerce-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── optional-interop-cp/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── optional-interop-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   ├── rfuncs.loc
    │   │   └── types.loc
    │   ├── optional-interop-rc/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── main.loc
    │   │   ├── rfuncs.loc
    │   │   └── types.loc
    │   ├── optional-json/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── optional-records-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── optional-records-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-records-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── packer-definitions-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── packer-definitions-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── lib/
    │   │   │   └── json/
    │   │   │       ├── json.py
    │   │   │       └── main.loc
    │   │   └── main.loc
    │   ├── packer-definitions-3/
    │   │   ├── Makefile
    │   │   ├── dumby.hpp
    │   │   ├── dumby.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── packer-definitions-4/
    │   │   ├── Makefile
    │   │   ├── dumby.hpp
    │   │   ├── dumby.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── packer-definitions-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── map.hpp
    │   │   └── map.py
    │   ├── packets-interop/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.h
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── make_test_data.py
    │   ├── packets-large/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.h
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── make_test_data.py
    │   │   └── test-data.mpk
    │   ├── parser-stress/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── path-shadowing-c/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   ├── main.hpp
    │   │   │   └── main.loc
    │   │   ├── baz/
    │   │   │   ├── main.hpp
    │   │   │   └── main.loc
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── path-shadowing-py/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   ├── main.loc
    │   │   │   └── main.py
    │   │   ├── baz/
    │   │   │   ├── main.loc
    │   │   │   └── main.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── path-shadowing-r/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   ├── main.R
    │   │   │   └── main.loc
    │   │   ├── baz/
    │   │   │   ├── main.R
    │   │   │   └── main.loc
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── pattern-getters/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── pattern-setters/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main-cpp.loc
    │   │   ├── main-py.loc
    │   │   ├── main-r.loc
    │   │   ├── tests.loc
    │   │   └── types.hpp
    │   ├── poly-list-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── record-docstrings/
    │   │   ├── Makefile
    │   │   ├── algconf.json
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── sysconf.json
    │   ├── records-alias/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── lib/
    │   │   │   └── main.loc
    │   │   └── main.loc
    │   ├── records-complex-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── records-complex-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── records-nested/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── records-primitive/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── recursion-cross-py-cpp/
    │   │   ├── Makefile
    │   │   ├── cpp_helpers.hpp
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── py_helpers.py
    │   ├── recursion-cross-r-cpp/
    │   │   ├── Makefile
    │   │   ├── cpp_helpers.hpp
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── r_helpers.R
    │   ├── recursion-direct-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-direct-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-direct-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-helper-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-helper-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-mutual-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-mutual-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-mutual-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-thunk-helper-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── recursion-thunk-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── scoping-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-10/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── high.loc
    │   │   ├── high.py
    │   │   └── low.loc
    │   ├── scoping-11/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── scoping-12/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── scoping-13/
    │   │   ├── Makefile
    │   │   ├── core.hpp
    │   │   ├── exp.txt
    │   │   ├── foo/
    │   │   │   ├── main.loc
    │   │   │   └── test/
    │   │   │       ├── bar.py
    │   │   │       └── main.loc
    │   │   ├── foo-cpp.loc
    │   │   └── main.loc
    │   ├── scoping-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-8/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── selection-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── selection-2/
    │   │   ├── Makefile
    │   │   ├── arithmetic/
    │   │   │   └── main.loc
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── selection-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.R
    │   ├── selection-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-10-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-10-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-10-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-11-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-11-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-11-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-12-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-12-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-12-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-4-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-4-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-4-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-5-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-5-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-5-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-6-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-6-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-6-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-7-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-7-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-7-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-8-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-8-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-8-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-9-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-9-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-9-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── slurm-label-codegen/
    │   │   ├── Makefile
    │   │   ├── bar.py
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.yaml
    │   ├── source-old-op-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── specialization-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── specialization-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── specialization-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── specialization-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── specialization-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── stderr-stdout/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── package.yaml
    │   ├── stdout-flush-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── fun.py
    │   │   └── main.loc
    │   ├── string-encoding/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── a.json
    │   │   ├── b.json
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── string-encoding-utf8/
    │   │   ├── Makefile
    │   │   ├── a.json
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── string-escape/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.R
    │   │   ├── helper.hpp
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── string-interpolation/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── string-json-parsing/
    │   │   ├── Makefile
    │   │   ├── a.json
    │   │   ├── b.json
    │   │   ├── c.json
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── string-multiline/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── string-pretty/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.h
    │   ├── table-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.py
    │   ├── table-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.R
    │   ├── tensor-comprehensive-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── tensor-comprehensive-cross/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-dimensions/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-nat-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── labeled.hpp
    │   │   └── main.loc
    │   ├── tensor-nat-labeled/
    │   │   ├── Makefile
    │   │   ├── cnn.hpp
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── tensor-nexus-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── tensor-pc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── tensor-rp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── tensor-table-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── thunk-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-choose/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-cross-force/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-do/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-effects/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-eval-forall/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rng.py
    │   ├── thunk-eval-hk/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rng.py
    │   ├── thunk-export/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-export-guard/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-force/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-guard-cross/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-interop/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-let/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-nullary-interop/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── two-module/
    │   │   ├── Makefile
    │   │   ├── combat.loc
    │   │   ├── exp.txt
    │   │   ├── tavern.loc
    │   │   ├── util.loc
    │   │   └── util.py
    │   ├── type-alias-transitive/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── main.loc
    │   │   ├── types/
    │   │   │   └── main.loc
    │   │   └── types-cpp.loc
    │   ├── type-annotations-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── type-identities-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── types.h
    │   ├── type-synthesis-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── type-synthesis-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── lib/
    │   │   │   ├── foo/
    │   │   │   │   ├── foo.py
    │   │   │   │   └── main.loc
    │   │   │   └── footypes/
    │   │   │       └── main.loc
    │   │   └── main.loc
    │   ├── typeclass-stress/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-8/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-edge-cases/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-interop/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-interpolation/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-source/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-source-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   └── unit-1/
    │       ├── Makefile
    │       ├── exp.txt
    │       ├── foo.py
    │       └── main.loc
    ├── install-tests/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── run-tests.sh
    │   ├── testcpp1/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── square.hpp
    │   ├── testcpp2/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── src/
    │   │       └── dbl.hpp
    │   ├── testcpp3/
    │   │   ├── inc.hpp
    │   │   ├── main.loc
    │   │   └── offset.hpp
    │   ├── testdatafile1/
    │   │   ├── data.txt
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── reader.py
    │   ├── testpy1/
    │   │   ├── helpers.py
    │   │   ├── main.loc
    │   │   └── package.yaml
    │   ├── testpy2/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── src/
    │   │       └── mathutil.py
    │   ├── testpy3/
    │   │   ├── fmtlib.py
    │   │   ├── formatter.py
    │   │   └── main.loc
    │   ├── testr1/
    │   │   ├── main.loc
    │   │   ├── negate.R
    │   │   └── package.yaml
    │   ├── testr2/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── src/
    │   │       └── triple.R
    │   └── testr3/
    │       ├── glue.R
    │       ├── main.loc
    │       └── rutil.R
    ├── integration/
    │   ├── Main.hs
    │   └── Morloc/
    │       └── Test/
    │           ├── Common.hs
    │           ├── ConcurrencyTests.hs
    │           ├── DaemonTests.hs
    │           ├── InstallTests.hs
    │           ├── ShmTests.hs
    │           └── StressTests.hs
    ├── shm-tests/
    │   ├── cppfuncs.loc
    │   ├── main.loc
    │   ├── pyfuncs.loc
    │   ├── stress.hpp
    │   ├── stress.py
    │   └── types.loc
    ├── stress/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── common.sh
    │   ├── concurrent-stress.sh
    │   ├── crash-recovery.sh
    │   ├── run-all.sh
    │   ├── valgrind-check.sh
    │   └── zombie-stress.sh
    ├── test.sh
    └── typecheck-benchmark/
        ├── apply-ann-20.loc
        ├── apply-deep-10.loc
        ├── apply-deep-100.loc
        ├── apply-deep-30.loc
        ├── apply-deep-50.loc
        ├── apply-deep.loc
        ├── apply-multi-arg-20.loc
        ├── compose-10.loc
        ├── compose-20.loc
        ├── compose-40.loc
        ├── partial-app.loc
        ├── poly-compose.loc
        ├── run-benchmarks.sh
        └── tuple-nested-20.loc

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
# Ignore build artifacts to keep Docker context small
.stack-work/
.git/
out/
container/static-build/.stack-work/
morloc-manager/.stack-work/
data/rust/target/
*.hi
*.o


================================================
FILE: .github/workflows/release.yml
================================================
# Release workflow: build all binaries + containers, run tests, publish release.
#
# Triggered by pushing a version tag:
#   git tag v0.68.0
#   git push origin v0.68.0
#
# Produces for each platform (linux-x86_64, linux-arm64, macos-arm64):
#   - morloc-manager  (Rust binary)
#   - libmorloc.so    (Rust runtime library; .dylib on macOS)
#   - morloc-nexus    (Rust binary)
#
# All three are attached to the GitHub Release.

name: Release

on:
  push:
    tags: ['v*']

env:
  REGISTRY: ghcr.io
  IMAGE_BASE: ghcr.io/morloc-project/morloc

jobs:
  # ---- Build Rust binaries (libmorloc + morloc-nexus + morloc-manager) per platform ----
  rust-binary:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            platform: linux-x86_64
            method: docker
          - os: ubuntu-24.04-arm
            platform: linux-arm64
            method: docker
          - os: macos-latest
            platform: macos-arm64
            method: native
    runs-on: ${{ matrix.os }}
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4

      # ---- Linux: Docker container build ----
      # libmorloc.so + morloc-nexus: glibc (Ubuntu 20.04)
      # morloc-manager: static (Alpine/musl)
      - name: Build Rust binaries (Linux)
        if: matrix.method == 'docker'
        run: |
          docker build -t morloc-rust-build \
            -f container/static-build/Dockerfile .
          mkdir -p out
          docker run --rm -v "$(pwd)/out:/out" morloc-rust-build
          # Verify morloc-manager is static
          file out/morloc-manager | grep -qE "static(ally|-pie) linked"

      - name: Rename artifacts (Linux)
        if: matrix.method == 'docker'
        run: |
          mv out/libmorloc.so out/libmorloc-${{ matrix.platform }}.so
          mv out/morloc-nexus out/morloc-nexus-${{ matrix.platform }}
          mv out/morloc-manager out/morloc-manager-${{ matrix.platform }}

      # ---- macOS: native cargo build ----
      - name: Setup Rust (macOS)
        if: matrix.method == 'native'
        uses: dtolnay/rust-toolchain@stable

      - name: Cache Cargo (macOS)
        if: matrix.method == 'native'
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            data/rust/target
          key: cargo-macos-${{ hashFiles('data/rust/Cargo.lock') }}
          restore-keys: cargo-macos-

      - name: Build Rust binaries (macOS)
        if: matrix.method == 'native'
        run: |
          cd data/rust
          # Build libmorloc (cdylib produces .dylib on macOS)
          cargo build --release -p morloc-runtime
          # Install .dylib so nexus can link against it
          mkdir -p $HOME/.local/share/morloc/lib
          cp target/release/libmorloc_runtime.dylib $HOME/.local/share/morloc/lib/libmorloc.dylib
          # Build nexus
          cargo build --release -p morloc-nexus
          # Build manager
          cargo build --release -p morloc-manager
          # Collect artifacts
          mkdir -p ../../out
          cp target/release/libmorloc_runtime.dylib ../../out/libmorloc-${{ matrix.platform }}.dylib
          cp target/release/morloc-nexus ../../out/morloc-nexus-${{ matrix.platform }}
          cp target/release/morloc-manager ../../out/morloc-manager-${{ matrix.platform }}
          strip ../../out/morloc-nexus-${{ matrix.platform }} || true
          strip ../../out/morloc-manager-${{ matrix.platform }} || true

      - name: Upload Rust artifacts
        uses: actions/upload-artifact@v4
        with:
          name: rust-binaries-${{ matrix.platform }}
          path: out/*

  # ---- Run tests using the Rust binaries ----
  test:
    needs: rust-binary
    runs-on: ubuntu-latest
    timeout-minutes: 60
    env:
      DEBIAN_FRONTEND: noninteractive
    steps:
      - uses: actions/checkout@v4
      - uses: haskell-actions/setup@v2
        with:
          ghc-version: '9.6.7'
          enable-stack: true
          stack-version: 'latest'
      - uses: actions/cache@v4
        with:
          path: |
            ~/.stack/snapshots
            ~/.stack/setup-exe-cache
            .stack-work
          key: stack-deps-release-${{ hashFiles('stack.yaml.lock', 'package.yaml') }}
          restore-keys: stack-deps-release-
      - name: Increase shared memory
        run: sudo mount -o remount,size=4G /dev/shm
      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends \
            r-base-core python3 python3-dev python3-pip \
            python3-numpy g++ gcc make libgsl-dev
          python3 -m pip install --break-system-packages --upgrade setuptools pyarrow

      - name: Cache R packages
        uses: actions/cache@v4
        id: r-cache
        with:
          path: ~/R/library
          key: r-lib-${{ runner.os }}-${{ runner.arch }}

      - name: Install R packages
        if: steps.r-cache.outputs.cache-hit != 'true'
        run: |
          mkdir -p ~/R/library
          LIBARROW_MINIMAL=true ARROW_S3=OFF ARROW_GCS=OFF \
            Rscript -e 'install.packages("arrow", lib="~/R/library", repos = "https://cloud.r-project.org")'

      - name: Download Rust binaries
        uses: actions/download-artifact@v4
        with:
          name: rust-binaries-linux-x86_64
          path: rust-bin

      - name: Prepare Rust binaries
        run: |
          mkdir -p prebuilt
          mv rust-bin/libmorloc-linux-x86_64.so prebuilt/libmorloc.so
          mv rust-bin/morloc-nexus-linux-x86_64 prebuilt/morloc-nexus
          mv rust-bin/morloc-manager-linux-x86_64 prebuilt/morloc-manager
          chmod +x prebuilt/libmorloc.so prebuilt/morloc-nexus prebuilt/morloc-manager

      - name: Add morloc to PATH
        run: |
          echo "$HOME/.local/bin" >> $GITHUB_PATH
          echo "$HOME/.local/share/morloc/bin" >> $GITHUB_PATH
          echo "R_LIBS_USER=$HOME/R/library" >> $GITHUB_ENV
      - name: Build morloc
        run: stack install --system-ghc --no-install-ghc --no-run-tests
      - name: Initialize morloc (using pre-built Rust binaries)
        run: |
          MORLOC_RUST_BIN=$(pwd)/prebuilt morloc init -f
          morloc install stdlib
      - name: Run tests
        run: stack test --system-ghc --no-install-ghc morloc:morloc-test
        timeout-minutes: 10

  # ---- Build and push container images ----
  containers:
    needs: test
    runs-on: ubuntu-latest
    timeout-minutes: 120
    permissions:
      packages: write
    steps:
      - uses: actions/checkout@v4

      - name: Extract version from tag
        id: ver
        run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"

      - name: Login to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build tiny (from local source)
        run: |
          docker build \
            -t ${{ env.IMAGE_BASE }}/morloc-tiny:${{ steps.ver.outputs.version }} \
            -t ${{ env.IMAGE_BASE }}/morloc-tiny:edge \
            -f container/tiny/Dockerfile .

      - name: Build full (uses local tiny)
        run: |
          docker build \
            --build-arg MORLOC_VERSION=${{ steps.ver.outputs.version }} \
            -t ${{ env.IMAGE_BASE }}/morloc-full:${{ steps.ver.outputs.version }} \
            -t ${{ env.IMAGE_BASE }}/morloc-full:edge \
            container/full/

      - name: Push all images
        run: |
          for img in morloc-tiny morloc-full; do
            docker push ${{ env.IMAGE_BASE }}/${img}:${{ steps.ver.outputs.version }}
            docker push ${{ env.IMAGE_BASE }}/${img}:edge
          done

  # ---- Create GitHub Release ----
  release:
    if: always() && needs.containers.result == 'success'
    needs: [containers, rust-binary]
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Download all artifacts
        uses: actions/download-artifact@v4
        with:
          pattern: 'rust-binaries-*'
          merge-multiple: true

      - name: List artifacts
        run: ls -lh

      - name: Create GitHub Release
        uses: softprops/action-gh-release@v2
        with:
          files: |
            morloc-manager-*
            libmorloc-*
            morloc-nexus-*
          generate_release_notes: true


================================================
FILE: .github/workflows/test.yml
================================================
name: Test Morloc
on: [push]

jobs:
  linux-test:
    runs-on: ubuntu-latest
    timeout-minutes: 60

    env:
      DEBIAN_FRONTEND: noninteractive

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Haskell (GHC + Stack)
        uses: haskell-actions/setup@v2
        with:
          ghc-version: '9.6.7'
          enable-stack: true
          stack-version: 'latest'

      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Cache Stack dependencies
        uses: actions/cache@v4
        with:
          path: |
            ~/.stack/snapshots
            ~/.stack/setup-exe-cache
            .stack-work
          key: stack-deps-${{ hashFiles('stack.yaml.lock', 'package.yaml') }}
          restore-keys: |
            stack-deps-

      - name: Cache Cargo dependencies
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            data/rust/target
          key: cargo-deps-${{ hashFiles('data/rust/Cargo.lock') }}
          restore-keys: |
            cargo-deps-

      - name: Increase shared memory (needed for morloc SHM pool tests)
        run: sudo mount -o remount,size=4G /dev/shm

      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends \
            r-base-core \
            python3 \
            python3-dev \
            python3-pip \
            python3-numpy \
            g++ \
            gcc \
            make \
            libgsl-dev
          python3 -m pip install --break-system-packages --upgrade setuptools pyarrow

      - name: Cache R packages
        uses: actions/cache@v4
        id: r-cache
        with:
          path: ~/R/library
          key: r-lib-${{ runner.os }}-${{ runner.arch }}

      - name: Install R packages
        if: steps.r-cache.outputs.cache-hit != 'true'
        run: |
          mkdir -p ~/R/library
          LIBARROW_MINIMAL=true ARROW_S3=OFF ARROW_GCS=OFF \
            Rscript -e 'install.packages("arrow", lib="~/R/library", repos = "https://cloud.r-project.org")'

      - name: Add morloc bin folders to PATH
        run: |
          echo "$HOME/.local/bin" >> $GITHUB_PATH
          echo "$HOME/.local/share/morloc/bin" >> $GITHUB_PATH
          echo "R_LIBS_USER=$HOME/R/library" >> $GITHUB_ENV

      - name: Build Morloc
        run: |
          stack install --system-ghc --no-install-ghc --no-run-tests

      - name: Initialize morloc and install modules
        run: |
          MORLOC_RUST_DIR=$(pwd)/data/rust morloc init -f
          morloc install stdlib

      - name: Test morloc
        run: |
          stack test --system-ghc --no-install-ghc morloc:morloc-test
        timeout-minutes: 10


================================================
FILE: .gitignore
================================================
tags
*.hi
*.o
.stack-work/
.history
morloc.cabal
*.out
run/
.idea/
*.iml
# ignore debugging files
*.aux
*.hp
*.prof
*.ps
.bash_history
.local
.stack
CLAUDE.md
.claude/
claude-memory/
.RData
.Rhistory
pools/
nexus
out/


================================================
FILE: ChangeLog.md
================================================
0.81.0 [2026-94-22]
-------------------
 * fix type inference for type families
 * extend intrinsic support for language-agnostic code
 * do shell-expansion of flagfile lines in morloc-manager
 * fix loss of pool stderr on crash (maybe?)

0.80.1 [2026-04-21]
-------------------
 * add `morloc-manager new --include <path>` src:dest syntax
 * make stderr/stdout mim principles more consistent

0.80.0 [2026-04-20]
-------------------
 * cleaner morloc-manager
 * fixed --print bug in nexus

0.79.1-5 [2026-04-19]
 * lot's morloc-manager updates

0.79.0 [2026-04-17]
-------------------
 * add @datafile intrinsic for finding installed files
 * default to including all files when installing
   - parse `.morlocignore` to find non-install files
   - allow `include` in package.yaml for strict file inclusion
 * add `morloc-manage doctor` subcommand for health checks
 * add additional `freeze/unfreeze` validation
 * fix unfreezing bugs

0.78.0 [2026-04-17]
-------------------
 * clean up CLI usage statements
 * suppress "null" outpput in Unit-returning CLIs
 * fix string escape bugs
 * fix where parsing after do-block
 * fix many small morloc-manager issues
 * fix paths in installed morloc programs


0.77.1 [2026-04-16]
-------------------
 * resurrected `morloc-manager log` subcommand

0.77.0 [2026-04-15]
-------------------
 * many many deployment fixes

0.76.0 [2026-04-13]
-------------------
 * fix docstring groups
 * add module docstrings
 * fix bug in unfreeze

0.75.0 [2026-04-12]
-------------------
 * allow effectful final do-notation statements
 * lots of bug fixes
 * make changelog version source of truth

0.74.0 [2026-04-06]
-------------------
 * unify morloc-manager env, workspace, and version
 * allow docstrings before declarations
 * allow literal leading spaces in docstrings
 * allow escaped `<word>:` syntax

0.73.0 [2026-04-01]
-------------------
 * fix @load error on missing file
 * fix error reporting on failed `morloc-manager install`

0.72.0 [2026-03-30]
-------------------
 * fix unicode support in comments and literal strings
 * many fixes to the morloc-manager

0.71.0-2 [2026-03-29]
-------------------
 * port morloc-manager to rust

0.70.1 to 0.70.6 [2026-03-29]
-----------------------------
 * fix portability for libmorloc and morloc-nexus on darwin and linux-arm64
 * python flushing face condition

0.70.0 [2026-03-29]
-------------------
 * port libmorloc and morloc-nexus from C to Rust

0.69.0 [2026-03-27]
-------------------
 * port morloc-manager from shell to Haskell
 * share it as a static binary

0.68.0 [2026-03-22]
-------------------
 * remove explicit universal quntifiers
    - before: `id a :: a -> a`
    - now:    `id   :: a -> a`
 * add `morloc uninstall --all` option
 * do not require repeated `let` terms

0.67.1 [2026-03-17]
-------------------
 * add missing Nat kind annotation to root modules
 * better test coverage of Nat kinds
 * add `morloc uninstall --all` option
 * add `stdlib` module that simplifies recursive install of everything

0.67.0 [2026-03-17]
-------------------
 * add Arrow tables with zero-copy between language sharing
 * add tensors and
 * remove explicit qualifiers
   - no more `id a :: a -> a`
   - now `id :: a -> a`
   - this does not require C++ be more explicit in their typing
 * inline when packet data is smaller than 65kb
   - this avoids fragmenting the shared memory with many small single-use values

0.66.0 [2026-03-12]
-------------------
 * fix propagation of errors from crashed pools
 * fix shm memory alignment (inefficiency on x86, crashes on ARM)
 * add `--sanitize` option to `morloc init` for strict memory
 * replace megaparsec with parsec
 * fix label and remote handling

0.65.0 [2026-03-10]
-------------------
 * `morloc eval` for running anonymous morloc expressions
 * add %inline pragma to skip manifold gen
 * allow batch syntax for instances
 * add @show and @read intrinsics
 * add namespaces for morloc imports

0.64.0 [2026-03-03]
-------------------
 * replace thunks with more granular effect system
 * add intrinsics
 * disambiguate local module imports 
 * change null to Null

0.63.0 [2026-02-25]
-------------------
 * add optionals with implicit coercion
 * for `?Str` with `literal: true`, force `default: null`
 * add daemon args to nexus

0.62.0 [2026-02-24]
-------------------
 * term recursion support
 * conditional guards
 * nexus pretty printing option (-p/--print)
 * print defaults in usage statements
 * more bug fixes

0.61.0 [2026-02-21]
-------------------

Build updates
 * make nexus a constant binary (not recreated and recompiled)
 * add install handling and portable scripts
 * add morloc daemon mode accessible through HTTP/TCP and sockets
 * add `morloc install --build` option for installing both executable modules
 * add `morloc uninstall`
 * add `morloc list` with -v option for listing types of all exports

Typesystem updates
 * add let syntax that enforces execution order
 * class constraints (e.g., unique :: Eq a => [a] -> [a])
 * superclasses (e.g., class Semigroup => Monoid a where ...)
 * add effect system for delayed execution
 * add do-syntax for imperative programming with effects

Better errors and UI
 * cleaner error messages
 * error message localization
 * clean `morloc typecheck` output
 * add CLI subcommand tested grouping
 * Add shell TAB-completion
 * fix haddock for future hackage release

Bug fixes
 * cleaned up memory issues in all C code
 * replaced mcparallel in R with forked pool of workers
 * fix bug in `morloc install .`

Testing
 * added stress test for zombies and memory issues
 * added daemon tests

Performance
 * Split the monolithic (~7000 line) morloc.h file
 * Use a libmorloc.so shared library rather than importing all as header
 * Removed all the zombie swarms that where killing heavy morloc projects
 * Remove mcparallel from R, move most of the pool to C, 4X interop speed
 * Compile and reuse a single nexus (reduce compile costs)

Language onboarding
 * Added codegen IR that greatly simplifies new language addition
 * Factor all language-specific material out of main Haskell codebase
 * Move all grammar into template yaml specs
 * Created MessagePack bridge to bypass voidstar, making lang onboard almost
   trivial (at a performance penalty).

Other
 * Transitioned parser from recursive descent to LR1

0.60.0 [2026-02-07]
-------------------
 * add infix operator support

Testing
 * Generate many new tests with Claude
 * Extensive testing of infix operators and module inheritance

Cleanup
 * add formatting with fourmulo
 * add metric and benchmarking

Bug fixes
 * Fix several memory issues in morloc.h and lang bindings
 * Fixed indexing bug in Generator.hs
 * Fix missing space in git module cp
 * Make missing folders in install path
 * Fix `morloc install` deletion of mod folder when install has trailing '/' 
 * Disallow space between sign and number

Performance
 * Fixed exponential case hit on eta resolution
 * Fixed quadratic case in subtype algorithm

Claude memory
 * Added claude memory files

0.59.0 [2026-01-23]
-------------------
 * allow functions in data structures
 * allow source functions to return functions
 * allow application of expressions that evaluate to functions
 * fix bug in C++ bool deserialization

0.58.3 [2026-01-03]
-------------------
 * fix record docstring inheritance

0.58.2 [2025-12-29]
-------------------
 * fix minor bug optional versus positional

0.58.1 [2025-12-28]
-------------------
 * fix minor bug in record unrolling

0.58.0 [2025-12-28]
-------------------
 * add hex, octal, and binary numeric representations
 * new record syntax
 * generate CLI from docstrings
     * resolve records into groups of arguments
     * allow literal strings without the extra JSON quoting
 * change to Apache-2.0

0.57.1 [2025-11-12]
-------------------
 * minor bug fixes

0.57.0 [2025-11-11]
-------------------
 * re-allow underscores in variable names
 * add placeholder syntax / lambda lifting from holes
 * multi-line strings
 * string interpolation
 * getter patterns
 * setter patterns
 * write full Morloc nexus evaluator
 * Fix bug in local installs with "."

0.56.0 [2025-10-08]
-------------------

New file organization
 * Change file layout to conform to XDG spec; 
   replaced `~/.morloc` with `~/.local/share/morloc`
 * Move standard library to `$MORLOC_HOME/src/morloc/plane/default/morloclib`
   * src/ - stores any source code morloc needs, not just modules 
   * morloc/ - stores morloc modules
   * plane/ - stores morloc modules that are part of a plane
   * default/ - the current default plane
   * morloclib/ - the org name for the core modules in the default plane

New `morloc install` subcommand functionality
 * Multiple imports may be chained on one command
 * Source and ref can be included per install, for example:
   * `root` - install a core module
   * `root@hash:abcdef1234` - specific core instance
   * `root@tag:v1.0.0` - specific tag/version
   * `codeberg:weena/calendar@hash:abcdef1234` - 3rd party with source and ref
 * Support for install of local modules
   

0.55.1 [2025-09-29]
-------------------

 * Bug fixes

0.55.0 [2025-09-27]
-------------------

 * Allow general types to be declared and imported/exported
 * Allow undirected dependencies
 * Allow dashes in module names
 * Fix many bugs in native Morloc code handling
 * Fix bug in certain higher order foreign functions
 * Simplify internal unique naming conventions
 * Move all tests to use the new root module (rather than base)
 * Slightly improved error messages

Breaking changes:
 * Move to reverse tree model of dependency handling
 * Allow exactly one type signature for each term and class
 * Require explicit typeclass import/export
 * Fix handling of Python builtin imports
    Now builtins must not be imported from Python source. Instead
    import directly from Python, for example: `source Py ("len")`
 * More efficient Haskell Map usage

0.54.2 [2025-08-09]
-------------------

 * Enforce lowercase module name rule
 * Fix handling of executable file name option
 * Fix record handling

0.54.1 [2025-07-26]
-------------------

 * Fix pickle bug in Python multiprocessing
 * Replace asprintf non-standard C function 
 * Partially fix interop for C structs
 * Fix bug in unqualified imports

0.54.0 [2025-07-13]
-------------------

 * Add full MessagePack and VoidStar IO to nexus
 * Fixed type pretty printing in usage and typechecking output
 * Add nexus option and usage info
 * Add support for one-line command docstrings

0.53.7 [2025-05-31]
-------------------

 * Fix bug in parameterized type definition concrete type inference

0.53.6 [2025-05-31]
-------------------

 * Improve container instructions in README
 * Fix all README examples
 * Make Dockerfiles more portable
 * Fix bug in implicit typeclass instance inheritance

0.53.5 [2025-05-12]
-------------------

 * Fixed unnecessary copying in C libs
 * Fixed double let-binding in code gen

0.53.4 [2025-05-08]
-------------------

 * Replace C daemon forking with thread pooling (4X speedup)
 * Fix bugs related to 0-length array memory allocation

0.53.3 [2025-05-06]
-------------------

 * Fix handling of empty vectors

0.53.2 [2025-05-06]
-------------------

 * Fix bug in JSON parsing

0.53.1 [2025-05-06]
-------------------

 * Update containers
 * Update github actions
 * Fix bug in type scoping (sort of)

0.53.0 [2025-05-04]
-------------------

Unify backend under shared C library

 * Replace python nexus with C nexus
 * Move packets to little-endian format
 * Move all packet handling, binary protocol specs, socket handling, JSON
   parsing from pool code into the shared morloc.h library
 * Replace R `future` parallelism scheme with builtin `parallel` library

Add remote worker and resource management support

 * Add conventions for specifying caching and evaluation strategy
 * Add xxhash hashing for caching
 * Add remote handling with experimental slurm support

Other

 * `morloc` commands now return proper exit codes

0.52.1 [2025-02-16]
-------------------
 * Add python native bytes and bytearray support

0.52.0 [2025-02-09]
-------------------

Type evaluation and specialization
 * Delayed general alias evaluation
 * Add strict numeric types (`int8`, `uint8`, `int16` etc)
 * Allow concrete alias specialization
 * Add type hints allowing concrete type conservation across foreign calls

Bug fixes
 * Fix bug in opening existing shared memory volumes

Language support
  * Add C++ support for std template list-like types (`list`, `forward_list`,
     `deque`, `stack`, and `set` (I know, they're a tad different)
  * Add Python support for `numpy` vectors and arrays
  * Allow raw R vectors to be interpreted as strings
  * Nexus no longer creates python objects from returned data, instead writes
    results directly through C library (`morloc.h`)

0.51.1 [2024-12-04]
-------------------

 * Do not catch STDOUT and STDERR
 * Fix NULL return errors
 * Fix container setup

0.51.0 [2024-12-02]
------------------

Shared memory

 * Allow processes to communicate through shared memory

Setup

 * `morloc init` command will now build the `morloc` ecosystem, writing all
   required headers to `morloc` home and compiling any required shared libraries.

Other

 * Fix cases where morloc stalls when errors are transmitted across languages
 * Moved demos to the dedicated example repo


0.50.0 [2024-11-08]
-------------------

Better installation

 * `morloc install --commit 45d8df12` - for github retrieval by commit hash
 * `morloc install --branch dev` - to retrieve latest from specific branch
 * `morloc install --tag 0.1.0` - to retrieve specific tag

Better containers
 * Use podman rather than docker in Makefile
 * `morloc-tiny:<version>` - everything needed to compile morloc projects
 * `morloc-full:<version>` - an environment for running projects


0.49.0 [2024-11-04]
-------------------

New backend with better performance

 * Mediate inter-process communication with UNIX domain sockets
 * Transmit data with MessagePack rather than JSON
 * Added a benchmarking suite
 * Added `morloc init` command to configure morloc ecosystem

0.48.0 [2024-05-10]
-------------------

Second PeerJ submission (after return by editor for technical reasons)

 * Made type parameters explicit as type arguments:
   `id a :: a -> a`
    rather than either of
   `id :: a -> a`
   `id :: forall a . a -> a`.
 * Pass-by-reference in generated C++ code
 * Simplify generated C++ code by using function template arguments rather
   than type casting.


0.47.2 [2024-04-28]
-------------------

 * made the build static
 * fixed the dockerfile
 * exported the vim-syntax file out to its own repo
 * added a --version option
 * upgraded to LTS 22.18

0.47.2 [2024-04-28]
-------------------

First PeerJ submission

0.47.0 [2024.03.10]
-------------------
 * Add value checker
 * Raise error when implementations have equal score (no arbitrary choice)

0.46.0 [2024.03.06]
-------------------

 * Fix precedence of '@' operator - it binds tightest
 * Update flu demo
 * Fix github actions
 * Fix Dockerfile
 * Address all compiler warnings

0.45.0 [2024.02.14]
-------------------

 * Allow explicit import of polymorphic terms
 * Fix infinite loop bug when two many arguments are applied to a function
 * Synchronise tests with new core libraries type classes

0.44.0 [2024.02.08]
-------------------

Add support for ad hoc polymorphism.
  * Support sources and declarations in classes 
  * Support multiple parameters
  * Support overlapping instances
  * Packers are now implemented through the `Packable` typeclass

Some missing features:
  * No support typeclass constraints in the type signatures.
  * No support for parameterized class variables
  * No support for polymorphic recursion (does anyone want that?)

0.43.0 [2024.01.14]
-------------------

New features
 * Allow a module to explicitly export packers
 * Show pool pseudocode for `typecheck -r` 
 * Add `typecheck dump` subcommand to show expressions and indices
 * Allow nexus inputs to be files
 * Remove concrete type signatures - always infer
 * Make fields in language-specific table decs optional
     Rather than this:
       table (Person a) = Person {name :: Str, info :: a}
       table R (Person a) = "data.frame" {name :: Str, info :: a}
     Allow this:
       table (Person a) = Person {name :: Str, info :: a}
       table R (Person a) = "data.frame"
     Really, I need to totally redo the table/record/object handling.
 * Remove support for anonymous records in type signatures
     I will re-add this possibly at a future time when I refactor

Infrastructure changes
 * Pass all data between pools as files rather than string arguments
 * Raise an error if any general type cannot be translated to a concrete type

Fixes
 * Fix record type inference 
 * Fix bug in collecting packers (missed packers required by root manifold)
 * Fix C++ handling of quotes and special characters in JSON strings

0.42.0 [2023.10.11]
-------------------

 * Infer concrete types from inferred general types when necessary and possible
 * More informative error messages 
 * Fix template resolution in generated C++ code
 * Fix include name shadowing conflict in generated C++ code
 * Partially fix naming conflict in Python and R pools caused by use of "f". My
   solution was name mangling, though we need a more permanent solution to our
   problem.
 * Let user write correct "list" R types for lists, tuples, and records
 * Fix bug in code generation of lets

## Internal
 * For `ForeignInterfaceM` constructor of ExprM, store the full call type, not
   just the return type
 * Parameterize `ExprM` with the type type (e.g., `Maybe TypeP` or `TypeM`)
 * Replace `Argument` and `PreArgument` with a parameterized `Arg` type.
 * Fix broken `ForeignInterfaceM` and `PoolCallM` cases in `typeOfExprM`
 * Refactor backend

 Testing and documentation:
 * Complete flu demo - it builds now, just need to implement the library code
   for align and other functions.


0.41.1 [2023.05.26]
-------------------

 * Print nothing if "null" is returned
 * Fix the import of working directory modules
 * Resolve bug in occur check
 * Streamline github actions script
 * Fix `morloc install` path download for core modules
 * Raise type error for untyped concrete term
 * Fix bug in concrete type synthesis

0.41.0 [2023.04.16]
-------------------

Language updates
 * Add check to avoid infinite typechecker recursion
 * Synthesize concrete types from general types when possible
 * Improve exports
   * Move exports to module list (as in Haskell)
   * Add `*` wildcard to export every top-level named term or type
   * Raise an error if a non-existing term is exported from a module
 * Allow concrete (un)packers to vary in number of generic terms
 * Set functions with empty inputs (e.g., `()`) to have empty lists of arguments
 * Replace the `Null` literal term with `()`


Package updates
 * Default to c++17, rather than c++11
 * Restructure library to avoid name conflicts with pre-existing packages
 * Replace Perl nexus with Python nexus and remove Perl dependencies

Better error messages and logs
 * Resolve "shit output" error message (map index to export name)
 * Tidy up the verbose diagnostics
 * Print general and concrete types for typecheck with -r option
 * Add multiple levels of verbosity (quiet by default)

Bug fixes
 * Typechecking bug in record access
 * Fix bug allowing undefined things in module export lists
 * Fix cousin module imports
 * Fix unparameterized (un)packer serialization
 * Fix error raised when a module exporting a type is compiled 
 * Fix out of order record fields in nexus output

0.40.0 [2023.02.04]
-------------------

 * Infer types of records
 * Fix bug in concrete type inference
 * Fix bugs in foreign higher order function code generation
 * Simplify generator code
 * Add many tests

0.39.0 [2023.01.03]
-------------------

 * Add compose operator
 * Allow eta-reduction

0.38.0 [2022.12.23]
-------------------

 * Choose casing convention
   * camel case for terms (for now, underscore is illegal)
   * pascal case for types
 * Fix sub-module handling
 * Fix import/export of type definitions
 * Better error messages for import/export errors
 * Somewhat formatted `typecheck` subcommand output 
 * Add option to typecheck backend (concrete types and language selection)

0.37.0 [2022.12.11]
-------------------

 * Remove extra space printed at the end of R JSON
 * Clarify error message for missing exports
 * Clarify error message for missing concrete signature
 * Fix exponential time bug in parser
 * Allow prime characters in names after first position
 * Allow '.' to separate namespaces in imports/modules
 * Fix infinite loop bug when module name != import name

0.36.0 [2022.02.17]
-------------------

 * Separate reals from integers
 * Remove global haskell extensions from package.yaml

0.36.0 [2022.02.17]
-------------------

 * Separate reals from integers
 * Remove global haskell extensions from package.yaml

0.35.0 [2021.10.24]
-------------------

Where scoping and a total architecture refactor

 * Fix handling for generic parameterized types
 * Improve whitespace handling
 * Statements are order invariant
 * Thread link from expression to source expression down to generators 
 * Typecheck over final abstract syntax trees rather than expressions
 * Separate general and concrete typechecking
 * Pretty instances for all data types
 * More testing
 * Agonized over deep and wide structures

0.34.0 [2021.03.05]
-------------------

 * Add handling for C++ float primitives
 * Let C++ programs be imported through a header and shared library
 * Remove semicolon requirement
 * Add hie.yaml for compatibility with hsl
 * Update dependency set to LTS-17.4
 * Add subparsers to CLI with pcapriotti/optparse-applicative 
 * Remove brace requirement for modules and `where` statements
 * Add `-o` option to compiler to specify output executable names
 * Acceptable syntax error messages

0.33.0 [2020.11.03]
-------------------

First hackage release

 * Haddock documentation
 * Update README
 * In help statements write universal, not concrete, types
 * Make default containers non-existential (probably a bad decision?)

0.32.0 [2020.11.01]
-------------------

 * Add record/table field access
 * Fix JSON handling in nexus
 * Fix nexus bug necessitated escaping quotations and braces
 * Print general types in nexus help
 * Resolve most GHC warnings

0.31.0 [2020.10.29]
-------------------

 * Fix anonymous records in C++
 * Distinguish 'record', 'object', and 'table'
 * Add object handling
 * Add table handling

0.30.0 [2020.10.23]
-------------------

 * Add `object` keyword for defining record types
 * Add full record serialization handling (C++, py, R)

0.29.0 [2020.10.21]
-------------------

 * Add AST directed (de)serialization framework
 * Add type constructors for parameterized types

0.28.0 [2020.10.12]
-------------------

 * Allow import/export of type aliases
 * Refactor with DAGs all through the parser and typechecker

0.27.0 [2020.10.04]
-------------------

 * Add systematic tests for data serialization
 * Fix bug in C++ serialization
 * Move to serialize to dedicated libraries that require no import

0.26.0 [2020.09.27]
-------------------

Add `type` keyword for defining type aliases

0.25.0 [2020.09.26]
-------------------

No explicit forall. Instead use Haskell convention of generics being lowercase
and non-generics being uppercase. 

 * no more explicit "forall"
 * generics are lowercase in type signatures
 * non-generic types are uppercase
 * normal functions are lowercase
 * class constructors are uppercase (though handling for this is not yet implemented)

0.24.0 [2020.09.22]
-------------------

Allow integration of many instances

0.23.0 [2020.05.14]

Bug fixes and code cleanup

Bug fixes / tests
 - [x] [x] github issue #7 - new Var=> typechecking rule
 - [x] [x] github issue #9 - rewire container type inference
 - [x] [x] github issue #10
 - [x] [x] github issue #11


0.22.0 [2020.04.28]
-------------------

Implement a schema-directed composable serialization system

Major changes
 * Fully composable serialization over containers and primitives
 * Improved C++ support of generic functions
 * Record support for R and Python3 (not C++ yet)
 * Refactor generator - replace old grammar system
 * Allow arguments to be passed to general functions
   (e.g., `foo x = [x]`, where no specific language is needed) 

Minor changes
 * change default python3 interpreter from "python" to "python3"
 * add default library and tmp paths to config handler
 * test composable serialization functions in all supported languages
 * allow wrapped comments in R

Testing - grammar directed testing
 * test record handling
 * remove and replace out-of-date golden tests
 * systematic argument handling tests
 * systematic manifold form tests
 * systematic interop testing

0.21.0 [2020.03.31]
-------------------

Major - add handling and test for many many corner cases
 * Allow export of data statements
 * Allow export of non-functions
 * Allow functions with containers at the root
 * Allow export of 0-argument functions 

Minor
 * proof-of-concept composable serialization functions in C++ (cppbase)
 * add python tests
 * make the test output look pretty (no weird whitespace)

0.20.0 [2020.03.23]
-------------------

 * Add composable default types

0.19.1 [2020.02.22]
-------------------

 * bug fixes

0.19.0 [2020.02.20]
-------------------

Major changes
 * Allow currying
 * Add realization optimizations
 * Refactor generator into series of clear transformations
 * Added handling for dealing with ambiguous ASTs

Minor bug fixes and updates
 * Prettier code generation for C++, Python and R
 * More detailed comments in generated code
 * Allow tags on parenthesized types
 * Fix bug in functions with multiple parameters 
 * Fix bug preventing loading of package metadata 

0.18.1 [2019.11.08]
-------------------

 * Fix travis
 * Use C++11 for C++ builds
 * Make .morloc/config optional
 * Fix bug in parsing unit type: `()`

0.18.0 [2019.11.04]
-------------------

 * Add bidirectional type system
 * Allow parameterized concrete types
 * Allow higher-order functions
 * Allow properties to contain multiple terms 
 * Add many tests
 * Add module system
 * Allow non-primitive types in lists, tuples, and records
 * Removed arq and SPARQL dependency (very fast compilation)

0.17.4 [2019.06.29]
-------------------

 * Add C and C++ handling
 * Define Ord intance for MTypeMeta
 * Allow pools to be called as executables
 * Add type handling to generators
 * Remove redundant SPARQL queries (better performance)
 * New RDF list semantics
 * Use strings to represent concrete types (e.g. "char\*")
 * Write pretty-printed diagnostic files to `$MORLOC_HOME/tmp` 
 * Handling for multiple concrete type signatures (e.g., definition of
   a function in multiple languages).
 * Handling for multiple abstract type signatures
 * Handling for multiple function declarations

0.17.3 [2019.06.14]
-------------------

 * Partial C support
   - execution of sourced functions
   - no composition
   - no foreign calls

 * Partial transition to typed generators
   - bound arguments are still not typed correctly

 * Use integer IDs to identify manifolds in pools and the nexus (can to make
   calls between them) instead of long, mangled names.

 * Replace string names of languages (e.g., "python") with a sum type.

0.17.2 [2019.05.05]
-------------------

  Pycon release

0.17.1 [2019.04.26]
-------------------

 * Fix output serialization in generate code
 * Fix module linking in generated code

0.17.0 [2019.04.16]
-------------------

 * Add morloc home
 * Load modules from `$MORLOCHOME/lib`
 * Create monad stack

0.16.2 [2018.03.05]
-------------------

 * Add Zenodo badge making the project citable
 * Move to `morloc-project/morloc` github repo

0.16.1 [2018.09.24]
-------------------

Minor release consisting of internal refactoring

 * Pruned unnecessary code
 * Pruned unnecessary imports
 * Compliance with stricter compile flags

0.16.0 [2018.09.14]
-------------------

 * Write RDF bools in lowercase ("true", rather than "True"), as per specs
 * Stricter node typing (replace ad hoc names with elements from an ADT)
 * Add very rudimentary typechecking
 * Remove SPARQL server dependency (now there's a sluggish Jena dependency)

0.15.1 [2018.09.10]
-------------------

 * Add error handling and reporting to pools
 * Add type signature comments to generated pools 
 * Richer internal data structures

0.15.0 [2018.09.05]
-------------------

 * Generalize code generators using grammar records
 * Add Python compatibility
 * Replace unit tests with golden tests
 * Use docopt and USAGE template for argument handling
 * Report number of arguments in nexus usage statements


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and


================================================
FILE: README.md
================================================
<p align="center">
  <a href="https://github.com/morloc-project/morloc/actions/workflows/.test.yml">
    <img src="https://github.com/morloc-project/morloc/actions/workflows/.test.yml/badge.svg" alt="build status">
  </a>
  <a href="https://github.com/morloc-project/morloc/releases">
    <img src="https://img.shields.io/github/release/morloc-project/morloc.svg?label=current+release" alt="github release">
  </a>
  <a href="https://www.apache.org/licenses/LICENSE-2.0">
      <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="license: Apache 2.0">
</a>
</p>

<p align="center">
  <a href="https://morloc-project.github.io/docs">Manual</a> |
  <a href="https://discord.gg/dyhKd9sJfF">Discord</a> |
  <a href="https://peerj.com/articles/cs-3435/">Paper</a> |
  <a href="https://x.com/morlocproject">X</a> |
  <a href="https://bsky.app/profile/morloc-project.bsky.social">BlueSky</a> |
  <a href= "mailto:z@morloc.io">Email</a>
</p>



<div align="center">
<h1>Morloc</h1>
<h2>compose functions across languages under a common type system</h2>
</div>

**Why use Morloc?**

 * Universal function composition: Import functions from multiple languages and
   compose them together under a unified, strongly-typed functional framework.

 * Polyglot without boilerplate: Use the best language for each task with no
   manual bindings or interop code.

 * Type-directed CLI generation: Write concrete function signatures once and
   automatically generate elegant command-line interfaces with argument
   parsing, validation, help text, and documentation.

 * Composable CLI tools: Morloc CLI programs can be composed by simply importing
   them into a new Morloc module and re-exporting their functions.

 * Seamless benchmarking and testing: Swap implementations and run the same
   benchmarks/tests across languages with consistent type signatures and data
   representation.

 * Design universal libraries: Build abstract, type-driven libraries and
   populate them with foreign language implementations, enabling rigorous code
   organization and reuse.

 * Smarter workflows: Replace brittle application/file-based pipelines with
   faster, more maintainable pipelines made from functions acting on structured
   data.


Below is a simple example, for installation details and more examples, see the
[Manual](https://morloc-project.github.io/docs).

A Morloc module can import functions from foreign languages, assign them general
types, and compose new functions:


```morloc
-- Morloc code, in "main.loc"
module m (vsum)

import root-py
import root-cpp

source Py from "foo.py" ("pmap")
pmap a b :: (a -> b) -> [a] -> [b] 

source Cpp from "foo.hpp" ("sum")
sum :: [Real] -> Real

--' Input numeric vectors that will be summed in parallel
--' metavar: VECTORS
type Vectors = [[Real]]

--' Sum a list of numeric vectors
--' return: Final sum of all elements in all vectors
vsum :: Vectors -> Real
vsum = sum . pmap sum 
```

The imported code is natural code with no Morloc-specific dependencies.

Below is the C++ code that defines `sum` as a function of a standard C++ vector
of `double`s that returns a `double`:

```C++
// C++ code, in "foo.hpp"

#pragma once

#include <vector>
#include <numeric>

double sum(std::vector<double> xs) {
    return std::accumulate(
       xs.begin(), xs.end(), 0.0);
}
```

Below is Python code that defines a parallel map function:

```python
# Python code, in "foo.py"

import multiprocessing as mp

# Parallel map function
def pmap(f, xs):
    with mp.Pool() as pool:
        results = pool.map(f, xs)
    return results
```

This program can be compiled and run as below:

```
$ menv morloc make main.loc

$ menv ./nexus vsum -h
Usage: ./nexus vsum VECTORS

Sum a list of numeric vectors

Positional arguments:
  VECTORS  Input numeric vectors that will be summed in parallel
           type: [[Real]]

Return: Real
  Final sum of all elements in all vectors

$ menv ./nexus vsum [[1.2],[0,0.1]]
1.3
```


================================================
FILE: bench/Bench.hs
================================================
{-|
Module      : Bench
Description : Benchmark suite for morloc compiler
Copyright   : (c) Zebulun Arendsee, 2016-2026
License     : Apache-2.0
Maintainer  : z@morloc.io

This benchmark suite tracks performance of key compiler components:
- Parser: parsing .loc source files
- Type checker: type inference and checking
- Code generator: nexus and pool generation

Run with: stack bench
Run with options: stack bench --benchmark-arguments '--csv bench-results.csv'
-}

module Main (main) where

import Test.Tasty.Bench
import qualified Data.Text as T
import System.FilePath ((</>))
import qualified System.Directory as SD

import Morloc (typecheckFrontend, typecheck)
import Morloc.Namespace.Prim (Code(..), Defaultable(..))
import Morloc.Namespace.State (Config(..), MorlocMonad, MorlocError)
import qualified Morloc.Monad as MM

-- | Helper to read benchmark test files
readTestFile :: FilePath -> IO Code
readTestFile name = do
  let path = "bench" </> "test-data" </> name
  Code . T.pack <$> readFile path

-- | Create a minimal config for benchmarking
emptyConfig :: IO Config
emptyConfig = do
  home <- SD.getHomeDirectory
  return $ Config
    { configHome        = home <> "/.local/share/morloc"
    , configLibrary     = home <> "/.local/share/src/morloc"
    , configPlane       = "default"
    , configPlaneCore   = "morloclib"
    , configTmpDir      = home <> "/.morloc/tmp"
    , configBuildConfig = home <> "/.morloc/.build-config.yaml"
    , configLangOverrides = mempty
    }

-- | Run a MorlocMonad action for benchmarking
runBench :: MorlocMonad a -> IO (Either MorlocError a)
runBench action = do
  config <- emptyConfig
  ((result, _), _) <- MM.runMorlocMonad Nothing 0 config defaultValue action
  return result

main :: IO ()
main = defaultMain
  [ bgroup "Parser"
    [ bench "parse-simple" $ whnfIO $ do
        code <- readTestFile "simple.loc"
        runBench (typecheckFrontend Nothing code)

    , bench "parse-interop" $ whnfIO $ do
        code <- readTestFile "interop.loc"
        runBench (typecheckFrontend Nothing code)

    , bench "parse-complex-types" $ whnfIO $ do
        code <- readTestFile "complex-types.loc"
        runBench (typecheckFrontend Nothing code)
    ]

  , bgroup "Type Checker"
    [ bench "typecheck-simple" $ whnfIO $ do
        code <- readTestFile "simple.loc"
        runBench (typecheck Nothing code)

    , bench "typecheck-interop" $ whnfIO $ do
        code <- readTestFile "interop.loc"
        runBench (typecheck Nothing code)

    , bench "typecheck-complex-types" $ whnfIO $ do
        code <- readTestFile "complex-types.loc"
        runBench (typecheck Nothing code)
    ]

  -- Note: Code generation benchmarks commented out as they require
  -- file system access and module initialization
  -- Uncomment after setting up appropriate test environment
  {-
  , bgroup "Code Generation"
    [ bench "generate-simple" $ whnfIO $ do
        code <- readTestFile "simple.loc"
        runBench (writeProgram Nothing code)
    ]
  -}
  ]


================================================
FILE: bench/test-data/complex-types.loc
================================================
module complex (processRecords)

type Record = {id :: Int, name :: Str, values :: [Real]}

processRecords :: [Record] -> [Int]
processRecords rs = map (\r -> r.id) rs


================================================
FILE: bench/test-data/interop.loc
================================================
module interop (processList)

import math (sqrt from python)

processList :: [Real] -> [Real]
processList xs = map sqrt xs


================================================
FILE: bench/test-data/simple.loc
================================================
module simple (add, mul)

add :: Int -> Int -> Int
add x y = x + y

mul :: Int -> Int -> Int
mul x y = x * y


================================================
FILE: container/Makefile
================================================
# Pushing to the github registry requires a personal token with package
# permissions. Login is required, for example:
#
#   $ echo $GITHUB_TOKEN | podman login ghcr.io -u morloc-project --password-stdin
#
# I am currently using the "classic" token (ghp_*), not the fine-grained
# token. These need to be refreshed every few months
#
# You need to provide the desired morloc version as an environmental variable,
# so run the make commands like so:
#
# $ make MORLOC_VERSION=0.70.0 build-tiny

define HEREDOC
#!/bin/bash
mkdir -p ~/.morloc
podman run --rm \
  -e HOME=$$HOME \
  -v $$HOME/.morloc:$$HOME/.morloc \
  -v $$PWD:$$HOME \
  -w $$HOME ghcr.io/morloc-project/morloc/morloc-tiny:edge \
  morloc "$$@"
endef
export HEREDOC

install:
	# Pull the exact version to ensure it exists locally
	podman pull ghcr.io/morloc-project/morloc/morloc-tiny:edge
	@mkdir -p ${HOME}/bin
	@echo "$$HEREDOC" > ${HOME}/bin/morloc-edge
	chmod 755 ${HOME}/bin/morloc-edge


# Build a container that just has the morloc compiler.
# Context is the repo root (..) so COPY gets the local source tree.
build-tiny:
	podman build --no-cache --force-rm \
		-t ghcr.io/morloc-project/morloc/morloc-tiny:$(MORLOC_VERSION) \
		-t ghcr.io/morloc-project/morloc/morloc-tiny:edge \
		-f tiny/Dockerfile ..

# Build the full interactive development image.
# Copies the morloc binary from the locally-built morloc-tiny image.
# Run build-tiny first.
build-full:
	podman build --no-cache --force-rm \
		--build-arg MORLOC_VERSION=$(MORLOC_VERSION) \
		-t ghcr.io/morloc-project/morloc/morloc-full:$(MORLOC_VERSION) \
		-t ghcr.io/morloc-project/morloc/morloc-full:edge \
		full

# Build the required docker image
build-test:
	podman build --no-cache --force-rm -t ghcr.io/morloc-project/morloc/morloc-test test
	podman tag ghcr.io/morloc-project/morloc/morloc-test ghcr.io/morloc-project/morloc/morloc-test:edge

shell:
	podman run --shm-size=4g --rm -it ghcr.io/morloc-project/morloc/morloc-full:edge /bin/bash

shell-tiny:
	podman run --shm-size=4g --rm -it ghcr.io/morloc-project/morloc/morloc-tiny:edge /bin/bash

shell-test:
	podman run --shm-size=4g --rm -it ghcr.io/morloc-project/morloc/morloc-test /bin/bash

# push local containers to the github registry
# Ensures edge moves to the same digest as $(MORLOC_VERSION)
push:
	# Push tiny version and edge
	podman push ghcr.io/morloc-project/morloc/morloc-tiny:$(MORLOC_VERSION)
	podman push ghcr.io/morloc-project/morloc/morloc-tiny:edge
	# Push full version and edge
	podman push ghcr.io/morloc-project/morloc/morloc-full:$(MORLOC_VERSION)
	podman push ghcr.io/morloc-project/morloc/morloc-full:edge
	# Push test (no moving tag)
	podman push ghcr.io/morloc-project/morloc/morloc-test:edge

# retrieve the latest morloc builds from the github registry
pull:
	podman pull ghcr.io/morloc-project/morloc/morloc-tiny:$(MORLOC_VERSION)
	podman pull ghcr.io/morloc-project/morloc/morloc-full:$(MORLOC_VERSION)
	podman pull ghcr.io/morloc-project/morloc/morloc-test
	podman pull ghcr.io/morloc-project/morloc/morloc-test:edge

# Convenience: pull moving edge tags
pull-edge:
	podman pull ghcr.io/morloc-project/morloc/morloc-tiny:edge
	podman pull ghcr.io/morloc-project/morloc/morloc-full:edge

# Cleanup of podman images may be done as follows
# $ podman image prune
# $ podman container prune
# $ podman image rm -f $(podman image ls -q)


================================================
FILE: container/full/Dockerfile
================================================
# Copy the morloc binary from the matching tiny image
ARG MORLOC_VERSION=edge
FROM ghcr.io/morloc-project/morloc/morloc-tiny:${MORLOC_VERSION} AS morloc-bin

FROM docker.io/library/ubuntu:24.04

LABEL org.opencontainers.image.source=https://github.com/morloc-project/morloc
LABEL org.opencontainers.image.description="A morloc container intended for interactive shell use"
LABEL org.opencontainers.image.licenses=Apache-2.0

COPY --from=morloc-bin /bin/morloc /bin/morloc
COPY --from=morloc-bin /opt/morloc-rust-bin /opt/morloc-rust-bin

WORKDIR $HOME

ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/root/.local/bin:/root/.local/share/morloc/bin:${PATH}"
# Pre-built Rust binaries: morloc init uses these directly (no cargo needed)
ENV MORLOC_RUST_BIN=/opt/morloc-rust-bin

RUN apt-get update

# Set the timezone, this avoids hanging later on
RUN TZ=Antarctica/Troll apt-get -y install tzdata

RUN apt-get install -y r-base python3 python3-dev python3-pip python3-numpy libgsl-dev git curl

RUN python3 -m pip install --break-system-packages --upgrade setuptools

# Setup the morloc home (uses pre-built Rust binaries, no cargo needed)
RUN morloc init
# Copy morloc-nexus to a system path so it remains on PATH even when
# morloc-manager bind-mounts over ~/.local/bin with a host directory
RUN cp /root/.local/share/morloc/bin/morloc-nexus /usr/local/bin/morloc-nexus
RUN echo "lang_python3 : python3" >> $HOME/.local/share/morloc/config

RUN morloc install stdlib

RUN apt-get install -y vim

# Copy over custom vimrc
COPY assets/vimrc /root/.vimrc
COPY assets/README /root/README

# Set up vim highlighting for morloc
RUN git clone https://github.com/morloc-project/vimmorloc \
  && mkdir -p ~/.vim/syntax/ \
  && mkdir -p ~/.vim/ftdetect/ \
  && cp vimmorloc/loc.vim ~/.vim/syntax/ \
  && echo 'au BufRead,BufNewFile *.loc set filetype=loc' > ~/.vim/ftdetect/loc.vim \
  && rm -rf vimmorloc

RUN git clone https://github.com/morloc-project/morloc ~/morloc

COPY assets/bashrc /etc/bash.bashrc

# Cleanup to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/*


================================================
FILE: container/full/assets/README
================================================
This container has a full morloc installation and language support for R, Python3, and C++.

The ~/tests folder contains a set of tests from the morloc test suite. These may
serve as simplistic examples of morloc scripts. Though they are designed for
testing the language not pedagogy.


================================================
FILE: container/full/assets/bashrc
================================================
# basic morloc bashrc

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# History Configuration
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=10000
HISTFILESIZE=20000
shopt -s histappend

# Shell Options
shopt -s checkwinsize
shopt -s globstar 2>/dev/null

# Colors
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi

# Prompt
# Detect if we have color support
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    # Define colors
    RESET='\[\033[0m\]'
    BOLD='\[\033[1m\]'
    DIM='\[\033[2m\]'
    
    # Color palette
    BLUE='\[\033[38;5;75m\]'
    GREEN='\[\033[38;5;114m\]'
    YELLOW='\[\033[38;5;221m\]'
    GRAY='\[\033[38;5;245m\]'
    RED='\[\033[38;5;204m\]'

    DEVNAME=""
    if [ ! -z "$MORLOC_ENV_NAME" ]; then
      DEVNAME="${DIM}${GRAY}(${MORLOC_ENV_NAME})${RESET} "
    fi 

    MORLOC_VERSION=$(morloc --version)
    if [ $? -eq 0 ]; then
      MORLOC_VERSION="-${MORLOC_VERSION}"
    fi
    
    # Format: (container) morloc $
    PS1="${DEVNAME}${YELLOW}morloc${MORLOC_VERSION}${RESET} $ "
else
    # Fallback for no color
    PS1="morloc $ "
fi

# aliases
alias ls='ls --color=auto'
alias ll='ls -lh'
alias la='ls -lah'
alias l='ls -CF'

# coloring
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

# fast navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'

# setup path
[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"

# completions
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi


================================================
FILE: container/full/assets/vimrc
================================================
" Jump to the last position when reopening a file
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

" Load indentation rules and plugins according to the detected filetype.
filetype plugin indent on
syntax on
set showcmd             " Show (partial) command in status line.
set showmatch           " Show matching brackets.
set ignorecase          " Do case insensitive matching
set smartcase           " Do smart case matching
set incsearch           " Incremental search
set autowrite           " Automatically save before commands like :next and :make
set hidden              " Hide buffers when they are abandoned

" An OK colorscheme
colorscheme torte


================================================
FILE: container/static-build/Dockerfile
================================================
# Portable build of libmorloc.so, morloc-nexus, and morloc-manager.
#
# Strategy:
#   - libmorloc.so: shared library built on Ubuntu 20.04 (glibc >= 2.31)
#   - morloc-nexus: dynamically linked to libmorloc.so (glibc >= 2.31)
#   - morloc-manager: fully static binary (Alpine/musl, runs on any Linux)
#
# Build:
#   docker build -t morloc-rust-build -f container/static-build/Dockerfile .
#   docker run --rm -v $(pwd)/out:/out morloc-rust-build
#
# Output:
#   ./out/libmorloc.so      (shared library, glibc >= 2.31)
#   ./out/morloc-nexus      (binary, glibc >= 2.31, links libmorloc.so)
#   ./out/morloc-manager    (static binary, runs on any Linux including NixOS)

# ===========================================================================
# Stage 1: Build libmorloc.so + morloc-nexus on Ubuntu (glibc)
#
# morloc-nexus dynamically links libmorloc.so at runtime, so both must be
# built against the same libc. Ubuntu 20.04 gives glibc 2.31 forward compat.
# ===========================================================================
FROM docker.io/library/ubuntu:20.04 AS glibc-builder

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl ca-certificates gcc g++ make pkg-config \
    && rm -rf /var/lib/apt/lists/*

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable \
    && /root/.cargo/bin/cargo --version
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /build

# Copy Cargo manifests first for dependency caching
COPY data/rust/Cargo.toml data/rust/Cargo.lock ./
COPY data/rust/morloc-runtime/Cargo.toml ./morloc-runtime/
COPY data/rust/morloc-nexus/Cargo.toml ./morloc-nexus/
COPY data/rust/morloc-manager/Cargo.toml ./morloc-manager/

# Create dummy source files for dependency pre-build
RUN mkdir -p morloc-runtime/src morloc-nexus/src morloc-manager/src \
    && echo "fn main() {}" > morloc-nexus/src/main.rs \
    && echo "fn main() {}" > morloc-manager/src/main.rs \
    && echo "" > morloc-runtime/src/lib.rs

RUN cargo build --release -p morloc-runtime 2>/dev/null || true

# Copy actual source
COPY data/rust/ ./

# Force rebuild after copying real source over dummy stubs
RUN touch morloc-runtime/src/lib.rs morloc-nexus/src/main.rs

# Build libmorloc.so from staticlib via gcc --whole-archive to export ALL
# symbols (internal Rust runtime state must be visible to language extensions)
RUN cargo build --release -p morloc-runtime

RUN mkdir -p /root/.local/share/morloc/lib \
    && gcc -shared -o /root/.local/share/morloc/lib/libmorloc.so \
       -Wl,--whole-archive target/release/libmorloc_runtime.a -Wl,--no-whole-archive \
       -lpthread -lrt -ldl -lm

# Build morloc-nexus (dynamically links libmorloc.so)
RUN cargo build --release -p morloc-nexus

RUN strip /root/.local/share/morloc/lib/libmorloc.so target/release/morloc-nexus

# ===========================================================================
# Stage 2: Build morloc-manager on Alpine (musl, fully static)
#
# morloc-manager has no native dependencies — pure Rust crates only.
# Building on Alpine produces a fully static musl binary that runs on any
# Linux, including NixOS and minimal containers.
# ===========================================================================
FROM docker.io/library/alpine:3.20 AS musl-builder

RUN apk add --no-cache curl gcc musl-dev

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable \
    && /root/.cargo/bin/cargo --version
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /build

# Copy Cargo manifests for dependency caching
COPY data/rust/Cargo.toml data/rust/Cargo.lock ./
COPY data/rust/morloc-runtime/Cargo.toml ./morloc-runtime/
COPY data/rust/morloc-nexus/Cargo.toml ./morloc-nexus/
COPY data/rust/morloc-manager/Cargo.toml ./morloc-manager/

RUN mkdir -p morloc-runtime/src morloc-nexus/src morloc-manager/src \
    && echo "fn main() {}" > morloc-nexus/src/main.rs \
    && echo "fn main() {}" > morloc-manager/src/main.rs \
    && echo "" > morloc-runtime/src/lib.rs

RUN cargo build --release -p morloc-manager 2>/dev/null || true

COPY data/rust/ ./

# Force rebuild: cargo may skip if it thinks the cached dummy binary is fresh
RUN touch morloc-manager/src/main.rs \
    && cargo build --release -p morloc-manager

RUN strip target/release/morloc-manager

# ===========================================================================
# Stage 3: Verify and output
# ===========================================================================
FROM docker.io/library/alpine:3.20

RUN apk add --no-cache file

COPY --from=glibc-builder /root/.local/share/morloc/lib/libmorloc.so /out-staging/libmorloc.so
COPY --from=glibc-builder /build/target/release/morloc-nexus /out-staging/morloc-nexus
COPY --from=musl-builder /build/target/release/morloc-manager /out-staging/morloc-manager

# Verify morloc-manager is static (no dynamic linker needed)
RUN file /out-staging/morloc-manager \
    && ! ldd /out-staging/morloc-manager 2>&1 | grep -q "=>" \
    && echo "OK: morloc-manager has no dynamic dependencies"

CMD ["sh", "-c", "cp /out-staging/libmorloc.so /out-staging/morloc-nexus /out-staging/morloc-manager /out/ && echo 'Wrote libmorloc.so, morloc-nexus, morloc-manager' && ls -lh /out/libmorloc.so /out/morloc-nexus /out/morloc-manager && echo && file /out/morloc-manager"]


================================================
FILE: container/static-build/build.sh
================================================
#!/bin/sh
# Build portable libmorloc.so, morloc-nexus, and morloc-manager.
#
# Usage:
#   ./container/static-build/build.sh
#
# Output:
#   ./out/libmorloc.so      (shared library, glibc >= 2.31)
#   ./out/morloc-nexus      (binary, glibc >= 2.31, links libmorloc.so)
#   ./out/morloc-manager    (static binary, runs on any Linux)

set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"

# Detect container engine (prefer podman)
if command -v podman >/dev/null 2>&1; then
    ENGINE=podman
elif command -v docker >/dev/null 2>&1; then
    ENGINE=docker
else
    echo "Error: neither podman nor docker found" >&2
    exit 1
fi

echo "Building libmorloc.so, morloc-nexus, and morloc-manager with $ENGINE..."

mkdir -p "$PROJECT_DIR/out"

$ENGINE build \
    -t morloc-rust-build \
    -f "$SCRIPT_DIR/Dockerfile" \
    "$PROJECT_DIR"

$ENGINE run --rm \
    -v "$PROJECT_DIR/out:/out" \
    morloc-rust-build

echo ""
echo "Binaries:"
ls -lh "$PROJECT_DIR/out/libmorloc.so" "$PROJECT_DIR/out/morloc-nexus" "$PROJECT_DIR/out/morloc-manager"
file "$PROJECT_DIR/out/libmorloc.so" "$PROJECT_DIR/out/morloc-nexus" "$PROJECT_DIR/out/morloc-manager"


================================================
FILE: container/test/Dockerfile
================================================
FROM docker.io/library/ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
  git \
  gdb \
  curl \
  pkg-config \
  libglib2.0-dev \
  build-essential \
  libffi-dev \
  libgmp-dev \
  zlib1g-dev

# Install GHCup into /opt/ghcup (accessible to all users)
ENV GHCUP_INSTALL_BASE_PREFIX=/opt
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

# Add ghcup to PATH
ENV PATH="/opt/.ghcup/bin:${PATH}"

# Install Rust toolchain (needed by morloc init to build libmorloc.so)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Set the timezone, this avoids hanging later on
RUN TZ=Antarctica/Troll apt-get -y install tzdata

# hyperfine is needed for shell benchmarks
RUN apt-get install -y r-base python3 python3-dev python3-pip libgsl-dev git hyperfine
RUN python3 -m pip install --break-system-packages --upgrade setuptools numpy pyarrow

# Set up R environment
# stringi is needed for benchmarks
RUN Rscript -e 'install.packages("stringi", repos  = "https://cloud.r-project.org")'

# Install R Arrow package for cross-language Arrow IPC support
ENV LIBARROW_MINIMAL=true
ENV ARROW_S3=OFF
ENV ARROW_GCS=OFF
RUN Rscript -e 'install.packages("arrow", repos = "https://cloud.r-project.org")'

# Cleanup to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Create /home/dev with permissive access so any --user UID:GID can write here.
# morloc-manager bind-mounts .stack and .local into this directory.
RUN mkdir -p /home/dev && chmod 1777 /home/dev

COPY assets/bashrc /etc/bash.bashrc


================================================
FILE: container/test/assets/bashrc
================================================
# basic morloc bashrc

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# History Configuration
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=10000
HISTFILESIZE=20000
shopt -s histappend

# Shell Options
shopt -s checkwinsize
shopt -s globstar 2>/dev/null

# Colors
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi

# Prompt
# Detect if we have color support
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    # Define colors
    RESET='\[\033[0m\]'
    BOLD='\[\033[1m\]'
    DIM='\[\033[2m\]'
    
    # Color palette
    BLUE='\[\033[38;5;75m\]'
    GREEN='\[\033[38;5;114m\]'
    YELLOW='\[\033[38;5;221m\]'
    GRAY='\[\033[38;5;245m\]'
    RED='\[\033[38;5;204m\]'

    DEVNAME=""
    if [ ! -z "$MORLOC_ENV_NAME" ]; then
      DEVNAME="${DIM}${GRAY}(${MORLOC_ENV_NAME})${RESET} "
    fi 
    
    # Format: (container) morloc $
    PS1="${DEVNAME}${YELLOW}morloc-dev${RESET} $ "
else
    # Fallback for no color
    PS1="morloc-dev $ "
fi

# aliases
alias ls='ls --color=auto'
alias ll='ls -lh'
alias la='ls -lah'
alias l='ls -CF'

# coloring
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

# fast navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'

# setup path
[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH"
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"

# completions
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi


================================================
FILE: container/tiny/Dockerfile
================================================
###############################################################################
# Stage 1: Build the morloc compiler from local source
FROM docker.io/library/ubuntu:24.04 AS morloc-build

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y git curl pkg-config libglib2.0-dev

# Install stack
RUN curl -SL https://get.haskellstack.org/ | sh

# Copy the local source tree (no git clone -- builds exactly this checkout)
COPY . /morloc

# Build morloc
RUN cd /morloc && stack install --no-run-tests

###############################################################################
# Stage 2: Build Rust binaries (libmorloc.so + morloc-nexus + morloc-manager)
FROM docker.io/library/ubuntu:24.04 AS rust-build

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl ca-certificates gcc g++ make pkg-config \
    && rm -rf /var/lib/apt/lists/*

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH="/root/.cargo/bin:${PATH}"

COPY data/rust/ /build/
WORKDIR /build

# Build libmorloc.so from staticlib
RUN cargo build --release -p morloc-runtime
RUN gcc -shared -o libmorloc.so \
    -Wl,--whole-archive target/release/libmorloc_runtime.a -Wl,--no-whole-archive \
    -lpthread -lrt -ldl -lm

# Install libmorloc.so where the nexus linker expects it
RUN mkdir -p /root/.local/share/morloc/lib \
    && cp libmorloc.so /root/.local/share/morloc/lib/

# Build morloc-nexus and morloc-manager
RUN cargo build --release -p morloc-nexus
RUN cargo build --release -p morloc-manager

# Strip all
RUN strip libmorloc.so target/release/morloc-nexus target/release/morloc-manager

# Collect into a single directory
RUN mkdir -p /rust-bin \
    && cp libmorloc.so /rust-bin/ \
    && cp target/release/morloc-nexus /rust-bin/ \
    && cp target/release/morloc-manager /rust-bin/

###############################################################################
# Stage 3: Final minimal image with compiler + pre-built Rust binaries

LABEL org.opencontainers.image.source=https://github.com/morloc-project/morloc
LABEL org.opencontainers.image.description="Morloc executable in a minimal container"
LABEL org.opencontainers.image.licenses=Apache-2.0

FROM docker.io/library/ubuntu:24.04
COPY --from=morloc-build /root/.local/bin/morloc /bin/morloc
COPY --from=rust-build /rust-bin/ /opt/morloc-rust-bin/

# morloc make builds C++ pools, so g++ is needed
RUN apt-get update && apt-get install -y --no-install-recommends g++ \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# Point morloc init at pre-built binaries (no cargo needed at runtime)
ENV MORLOC_RUST_BIN=/opt/morloc-rust-bin


================================================
FILE: data/lang/c/lang.yaml
================================================
# C language metadata for morloc compiler
name: c
extension: c
aliases: []
is_compiled: true
run_command: []
serial_type: ""
cost: 1


================================================
FILE: data/lang/cpp/cppmorloc.cpp
================================================
#include <stdexcept>
#include <string>
#include <cstdlib>

#include "morloc.h"

absptr_t cpp_rel2abs(relptr_t ptr){
    char* errmsg = NULL;
    absptr_t absptr = rel2abs(ptr, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return absptr;
}

relptr_t abs2rel_cpp(absptr_t ptr){
    char* errmsg = NULL;
    relptr_t relptr = abs2rel(ptr, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return relptr;
}

bool shfree_cpp(absptr_t ptr){
    char* errmsg = NULL;
    bool success = shfree(ptr, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return success;
}

Schema* parse_schema_cpp(const char* schema_ptr){
    char* errmsg = NULL;
    Schema* schema = parse_schema(schema_ptr, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return schema;
}

void* shmalloc_cpp(size_t size){
    char* errmsg = NULL;
    void* new_ptr = shmalloc(size, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return new_ptr;
}

shm_t* shinit_cpp(const char* shm_basename, size_t volume_index, size_t shm_size) {
    char* errmsg = NULL;
    shm_t* new_ptr = shinit(shm_basename, volume_index, shm_size, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return new_ptr;
}

int pack_with_schema_cpp(const void* mlc, const Schema* schema, char** mpk, size_t* mpk_size){
    char* errmsg = NULL;
    int exitcode = pack_with_schema(mlc, schema, mpk, mpk_size, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return exitcode;
}

int unpack_with_schema_cpp(const char* mgk, size_t mgk_size, const Schema* schema, void** mlcptr){
    char* errmsg = NULL;
    int exitcode = unpack_with_schema(mgk, mgk_size, schema, mlcptr, &errmsg);
    if(errmsg != NULL){
        std::string msg(errmsg); free(errmsg);
        throw std::runtime_error(msg);
    }
    return exitcode;
}


================================================
FILE: data/lang/cpp/cppmorloc.hpp
================================================
#ifndef __CPPMORLOC_HPP__
#define __CPPMORLOC_HPP__

#include <vector>
#include <stack>
#include <list>
#include <forward_list>
#include <queue>
#include <deque>
#include <optional>

#include <algorithm>
#include <tuple>
#include <stdexcept>
#include <cstring>
#include <string>
#include <type_traits>

#include "morloc.h"
#include "mlc_tensor.hpp"

// ============================================================
// Type traits for container dispatch
// ============================================================

template<typename T> struct is_std_vector : std::false_type {};
template<typename T, typename A> struct is_std_vector<std::vector<T, A>> : std::true_type {};

template<typename T> struct is_std_list : std::false_type {};
template<typename T, typename A> struct is_std_list<std::list<T, A>> : std::true_type {};

template<typename T> struct is_std_forward_list : std::false_type {};
template<typename T, typename A> struct is_std_forward_list<std::forward_list<T, A>> : std::true_type {};

template<typename T> struct is_std_deque : std::false_type {};
template<typename T, typename A> struct is_std_deque<std::deque<T, A>> : std::true_type {};

template<typename T> struct is_std_stack : std::false_type {};
template<typename T, typename C> struct is_std_stack<std::stack<T, C>> : std::true_type {};

template<typename T> struct is_std_queue : std::false_type {};
template<typename T, typename C> struct is_std_queue<std::queue<T, C>> : std::true_type {};

template<typename T> struct is_std_tuple : std::false_type {};
template<typename... Args> struct is_std_tuple<std::tuple<Args...>> : std::true_type {};

template<typename T> struct is_std_pair : std::false_type {};
template<typename A, typename B> struct is_std_pair<std::pair<A, B>> : std::true_type {};

template<typename T> struct is_std_optional : std::false_type {};
template<typename T> struct is_std_optional<std::optional<T>> : std::true_type {};

template<typename T>
inline constexpr bool is_non_vector_container_v =
    is_std_list<T>::value || is_std_forward_list<T>::value ||
    is_std_deque<T>::value || is_std_stack<T>::value ||
    is_std_queue<T>::value;


// ============================================================
// Container-to-vector conversion
// ============================================================

template<typename Container>
auto to_vector(const Container& c) {
    using T = typename Container::value_type;
    if constexpr (is_std_stack<Container>::value) {
        std::vector<T> v;
        auto copy = c;
        while (!copy.empty()) { v.push_back(copy.top()); copy.pop(); }
        std::reverse(v.begin(), v.end());
        return v;
    } else if constexpr (is_std_queue<Container>::value) {
        std::vector<T> v;
        auto copy = c;
        while (!copy.empty()) { v.push_back(copy.front()); copy.pop(); }
        return v;
    } else {
        return std::vector<T>(c.begin(), c.end());
    }
}


// ============================================================
// C runtime wrappers (implementations in cppmorloc.cpp)
// ============================================================

absptr_t cpp_rel2abs(relptr_t ptr);
relptr_t abs2rel_cpp(absptr_t ptr);

// Resolve a relative pointer using either base-pointer arithmetic (inline data)
// or SHM. When base_ptr is non-null, data lives in a contiguous malloc'd blob.
static inline void* resolve_relptr_cpp(relptr_t relptr, const void* base_ptr) {
    if (base_ptr) {
        return (char*)base_ptr + relptr;
    }
    return cpp_rel2abs(relptr);
}
bool shfree_cpp(absptr_t ptr);
Schema* parse_schema_cpp(const char* schema_ptr);
void* shmalloc_cpp(size_t size);
shm_t* shinit_cpp(const char* shm_basename, size_t volume_index, size_t shm_size);
int pack_with_schema_cpp(const void* mlc, const Schema* schema, char** mpk, size_t* mpk_size);
int unpack_with_schema_cpp(const char* mgk, size_t mgk_size, const Schema* schema, void** mlcptr);


// ============================================================
// mpk_pack / mpk_unpack declarations
// ============================================================

template<typename T>
std::vector<char> mpk_pack(const T& data, const std::string& schema_str);

template<typename T>
T mpk_unpack(const std::vector<char>& packed_data, const std::string& schema_str);


// ============================================================
// schema_alignment (C++ mirror of the C function in schema.c)
// ============================================================

inline size_t schema_alignment_cpp(const Schema* schema) {
    switch (schema->type) {
        case MORLOC_NIL: case MORLOC_BOOL: case MORLOC_SINT8: case MORLOC_UINT8: return 1;
        case MORLOC_SINT16: case MORLOC_UINT16: return 2;
        case MORLOC_SINT32: case MORLOC_UINT32: case MORLOC_FLOAT32: return 4;
        case MORLOC_SINT64: case MORLOC_UINT64: case MORLOC_FLOAT64:
        case MORLOC_STRING: case MORLOC_ARRAY: case MORLOC_TENSOR: return alignof(size_t);
        case MORLOC_TUPLE: case MORLOC_MAP: {
            size_t max_align = 1;
            for (size_t i = 0; i < schema->size; i++) {
                size_t a = schema_alignment_cpp(schema->parameters[i]);
                if (a > max_align) max_align = a;
            }
            return max_align;
        }
        case MORLOC_OPTIONAL: return schema_alignment_cpp(schema->parameters[0]);
        default: return alignof(size_t);
    }
}


// ============================================================
// get_shm_size
// ============================================================

// Forward declaration
template<typename T>
size_t get_shm_size(const Schema* schema, const T& data);

size_t get_shm_size(const Schema* schema, const std::nullptr_t&) {
    return sizeof(int8_t);
}

// Primitives
template<typename Primitive>
size_t get_shm_size(const Schema* schema, const Primitive& data) {
    return schema->width;
}

template<typename T>
size_t get_shm_size(const Schema* schema, const std::vector<T>& data) {
    size_t total_size = schema->width;
    // worst-case cursor alignment padding for element data
    total_size += schema_alignment_cpp(schema->parameters[0]) - 1;
    switch(schema->parameters[0]->type){
        case MORLOC_NIL:
        case MORLOC_BOOL:
        case MORLOC_SINT8:
        case MORLOC_SINT16:
        case MORLOC_SINT32:
        case MORLOC_SINT64:
        case MORLOC_UINT8:
        case MORLOC_UINT16:
        case MORLOC_UINT32:
        case MORLOC_UINT64:
        case MORLOC_FLOAT32:
        case MORLOC_FLOAT64:
            total_size += data.size() * schema->parameters[0]->width;
            break;
        case MORLOC_STRING:
        case MORLOC_ARRAY:
        case MORLOC_TUPLE:
        case MORLOC_MAP:
        case MORLOC_OPTIONAL:
            for(size_t i = 0; i < data.size(); i++){
               total_size += get_shm_size(schema->parameters[0], data[i]);
            }
            break;
    }
    return total_size;
}

// Optional: tag byte + aligned inner value
template<typename T>
size_t get_shm_size(const Schema* schema, const std::optional<T>& data) {
    if (!data.has_value()) {
        return schema->width;
    }
    size_t inner_size = get_shm_size(schema->parameters[0], *data);
    size_t extra = (inner_size > schema->parameters[0]->width) ? inner_size - schema->parameters[0]->width : 0;
    return schema->width + extra;
}

size_t get_shm_size(const Schema* schema, const std::string& data) {
    return schema->width + data.size();
}

size_t get_shm_size(void* dest, const Schema* schema, const char* data) {
    return schema->width + strlen(data);
}

template<typename Tuple, size_t... Is>
size_t createTupleShmSizeHelper(const Schema* schema, const Tuple& data, std::index_sequence<Is...>) {
    size_t total_size = schema->width;
    (void)std::initializer_list<int>{(
        [&](){
            size_t elem = get_shm_size(schema->parameters[Is], std::get<Is>(data));
            if (elem > schema->parameters[Is]->width) {
                total_size += elem - schema->parameters[Is]->width;
            }
        }(),
        0
    )...};
    return total_size;
}

template<typename... Args>
size_t get_shm_size(const Schema* schema, const std::tuple<Args...>& data) {
    return createTupleShmSizeHelper(schema, data, std::index_sequence_for<Args...>{});
}

// Non-vector containers: convert to vector and delegate
template<typename T>
size_t get_shm_size(const Schema* schema, const std::list<T>& data) {
    return get_shm_size(schema, to_vector(data));
}

template<typename T>
size_t get_shm_size(const Schema* schema, const std::forward_list<T>& data) {
    return get_shm_size(schema, to_vector(data));
}

template<typename T>
size_t get_shm_size(const Schema* schema, const std::deque<T>& data) {
    return get_shm_size(schema, to_vector(data));
}

template<typename T>
size_t get_shm_size(const Schema* schema, const std::stack<T>& data) {
    return get_shm_size(schema, to_vector(data));
}

template<typename T>
size_t get_shm_size(const Schema* schema, const std::queue<T>& data) {
    return get_shm_size(schema, to_vector(data));
}

// Tensor: header + shape array + contiguous data
template<typename T, int NDim>
size_t get_shm_size(const Schema* schema, const mlc::Tensor<T, NDim>& data) {
    using S = mlc::tensor_storage_t<T>;
    size_t total = sizeof(Tensor);
    // alignment padding for shape array
    total += alignof(int64_t) - 1;
    total += NDim * sizeof(int64_t);
    // alignment padding for element data
    total += schema_alignment_cpp(schema->parameters[0]) - 1;
    total += data.size() * sizeof(S);
    return total;
}


// ============================================================
// toAnything - top-level (allocating)
// ============================================================

// Generic top-level: compute size, allocate, serialize
template<typename T>
void* toAnything(const Schema* schema, const T& data){
    size_t total_size = get_shm_size(schema, data);
    void* dest = shmalloc_cpp(total_size);
    void* cursor = (void*)((char*)dest + schema->width);
    try {
        return toAnything(dest, &cursor, schema, data);
    } catch (...) {
        shfree_cpp(dest);
        throw;
    }
}

// Non-vector containers: convert to vector and delegate
template<typename T>
void* toAnything(const Schema* schema, const std::stack<T>& data) {
    return toAnything(schema, to_vector(data));
}

template<typename T>
void* toAnything(const Schema* schema, const std::forward_list<T>& data) {
    return toAnything(schema, to_vector(data));
}

template<typename T>
void* toAnything(const Schema* schema, const std::queue<T>& data) {
    return toAnything(schema, to_vector(data));
}

template<typename T>
void* toAnything(const Schema* schema, const std::deque<T>& data) {
    return toAnything(schema, to_vector(data));
}

template<typename T>
void* toAnything(const Schema* schema, const std::list<T>& data) {
    return toAnything(schema, to_vector(data));
}


// ============================================================
// toAnything - cursor-based (recursive)
// ============================================================

// Forward declaration
template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const T& data);

// Write raw binary data as an array
void* binarytoAnything(void* dest, void** cursor, const Schema* schema, const uint8_t* data, size_t size) {
    Array* result = static_cast<Array*>(dest);
    result->size = size;
    if(size == 0){
        result->data = RELNULL;
        return dest;
    }
    absptr_t data_ptr = static_cast<absptr_t>(*cursor);
    result->data = abs2rel_cpp(data_ptr);
    *cursor = static_cast<char*>(*cursor) + size * schema->parameters[0]->width;
    memcpy(data_ptr, data, size);
    return dest;
}

void* toAnything(void* dest, void** cursor, const Schema* schema, const std::nullptr_t&) {
    *((int8_t*)dest) = (int8_t)0;
    return dest;
}

// Primitives
template<typename Primitive>
void* toAnything(void* dest, void** cursor, const Schema* schema, const Primitive& data) {
    *((Primitive*)dest) = data;
    return dest;
}

// Vector (primary array implementation)
template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::vector<T>& data) {
    Array* result = static_cast<Array*>(dest);
    result->size = data.size();
    if(data.size() == 0){
        result->data = RELNULL;
        return dest;
    }
    // align cursor for element data placement
    *cursor = reinterpret_cast<void*>(ALIGN_UP(reinterpret_cast<uintptr_t>(*cursor), schema_alignment_cpp(schema->parameters[0])));
    result->data = abs2rel_cpp(static_cast<absptr_t>(*cursor));
    *cursor = static_cast<char*>(*cursor) + data.size() * schema->parameters[0]->width;
    char* start = (char*)cpp_rel2abs(result->data);
    size_t width = schema->parameters[0]->width;
    for (size_t i = 0; i < data.size(); ++i) {
         toAnything(start + width * i, cursor, schema->parameters[0], data[i]);
    }
    return dest;
}

// Shared helper for iterable containers (list, forward_list, deque)
template<typename Container>
void* toAnything_seq(void* dest, void** cursor, const Schema* schema, const Container& data, size_t size) {
    Array* result = static_cast<Array*>(dest);
    result->size = size;
    if(size == 0){
        result->data = RELNULL;
        return dest;
    }
    // align cursor for element data placement
    *cursor = reinterpret_cast<void*>(ALIGN_UP(reinterpret_cast<uintptr_t>(*cursor), schema_alignment_cpp(schema->parameters[0])));
    result->data = abs2rel_cpp(static_cast<absptr_t>(*cursor));
    *cursor = static_cast<char*>(*cursor) + size * schema->parameters[0]->width;
    char* start = (char*)cpp_rel2abs(result->data);
    size_t width = schema->parameters[0]->width;
    size_t i = 0;
    for (const auto& item : data) {
        toAnything(start + width * i, cursor, schema->parameters[0], item);
        ++i;
    }
    return dest;
}

template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::list<T>& data) {
    return toAnything_seq(dest, cursor, schema, data, data.size());
}

template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::forward_list<T>& data) {
    return toAnything_seq(dest, cursor, schema, data, std::distance(data.begin(), data.end()));
}

template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::deque<T>& data) {
    return toAnything_seq(dest, cursor, schema, data, data.size());
}

// Stack and queue: convert to vector and delegate
template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::queue<T>& data) {
    return toAnything(dest, cursor, schema, to_vector(data));
}

template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::stack<T>& data) {
    return toAnything(dest, cursor, schema, to_vector(data));
}

// String and C string
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::string& data) {
    return binarytoAnything(dest, cursor, schema, (const uint8_t*)data.c_str(), data.size());
}

void* toAnything(void* dest, void** cursor, const Schema* schema, const char* data) {
    return binarytoAnything(dest, cursor, schema, (const uint8_t*)data, strlen(data));
}

// Tuple
template<typename Tuple, size_t... Is>
void* createTupleAnythingHelper(void* dest, const Schema* schema, void** cursor, const Tuple& data, std::index_sequence<Is...>) {
    (void)std::initializer_list<int>{(
        toAnything((char*)dest + schema->offsets[Is], cursor, schema->parameters[Is], std::get<Is>(data)),
        0
    )...};
    return dest;
}

template<typename... Args>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::tuple<Args...>& data) {
    return createTupleAnythingHelper(dest, schema, cursor, data, std::index_sequence_for<Args...>{});
}

// Pair (reuses tuple helper since std::pair supports std::get)
template<typename A, typename B>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::pair<A, B>& data) {
    return createTupleAnythingHelper(dest, schema, cursor, data, std::index_sequence<0, 1>{});
}

// Optional
template<typename T>
void* toAnything(void* dest, void** cursor, const Schema* schema, const std::optional<T>& data) {
    if (!data.has_value()) {
        *((uint8_t*)dest) = 0;
        memset((char*)dest + schema->offsets[0], 0, schema->parameters[0]->width);
    } else {
        *((uint8_t*)dest) = 1;
        toAnything((char*)dest + schema->offsets[0], cursor, schema->parameters[0], *data);
    }
    return dest;
}

// Tensor: write Tensor header + shape array + contiguous data
template<typename T, int NDim>
void* toAnything(void* dest, void** cursor, const Schema* schema, const mlc::Tensor<T, NDim>& data) {
    Tensor* result = static_cast<Tensor*>(dest);
    result->total_elements = data.size();
    result->device_type = 0;
    result->device_id = 0;

    if (data.size() == 0) {
        result->shape = RELNULL;
        result->data = RELNULL;
        return dest;
    }

    // Write shape array
    *cursor = reinterpret_cast<void*>(ALIGN_UP(reinterpret_cast<uintptr_t>(*cursor), alignof(int64_t)));
    result->shape = abs2rel_cpp(static_cast<absptr_t>(*cursor));
    int64_t* shape_dst = (int64_t*)*cursor;
    for (int i = 0; i < NDim; i++) shape_dst[i] = data.shape()[i];
    *cursor = (char*)*cursor + NDim * sizeof(int64_t);

    // Write data buffer (contiguous row-major)
    using S = mlc::tensor_storage_t<T>;
    size_t elem_align = schema_alignment_cpp(schema->parameters[0]);
    *cursor = reinterpret_cast<void*>(ALIGN_UP(reinterpret_cast<uintptr_t>(*cursor), elem_align));
    result->data = abs2rel_cpp(static_cast<absptr_t>(*cursor));
    size_t data_bytes = data.size() * sizeof(S);
    memcpy(*cursor, data.data(), data_bytes);
    *cursor = (char*)*cursor + data_bytes;

    return dest;
}


// ============================================================
// fromAnything - single template with if constexpr dispatch
// ============================================================

// Forward declaration for recursive calls
template<typename T>
T fromAnything(const Schema* schema, const void* data, T* = nullptr, const void* base_ptr = nullptr);

// Tuple helper (needs forward declaration of fromAnything)
template<typename Tuple, size_t... Is>
Tuple fromTupleAnythingHelper(
  const Schema* schema,
  const void* anything,
  std::index_sequence<Is...>,
  Tuple* = nullptr,
  const void* base_ptr = nullptr
) {
    return Tuple(fromAnything(schema->parameters[Is],
                              (char*)anything + schema->offsets[Is],
                              static_cast<std::tuple_element_t<Is, Tuple>*>(nullptr),
                              base_ptr)...);
}

template<typename T>
T fromAnything(const Schema* schema, const void* data, T*, const void* base_ptr) {
    if(data == NULL){
        throw std::runtime_error("Void error in fromAnything");
    }

    if constexpr (std::is_same_v<T, bool>) {
        // NOTE: do NOT use bool here since its width is often not 1 byte
        return *(uint8_t*)data == 1;
    }
    else if constexpr (std::is_same_v<T, std::string>) {
        Array* array = (Array*)data;
        if(array->size > 0){
            return std::string((char*)resolve_relptr_cpp(array->data, base_ptr), array->size);
        }
        return std::string("");
    }
    else if constexpr (is_std_vector<T>::value) {
        using ElemT = typename T::value_type;
        std::vector<ElemT> result;
        Array* array = (Array*)data;
        if(array->size == 0) return result;

        // Fast path for primitive arrays
        switch(schema->parameters[0]->type){
            case MORLOC_NIL:
            case MORLOC_BOOL:
            case MORLOC_SINT8:
            case MORLOC_SINT16:
            case MORLOC_SINT32:
            case MORLOC_SINT64:
            case MORLOC_UINT8:
            case MORLOC_UINT16:
            case MORLOC_UINT32:
            case MORLOC_UINT64:
            case MORLOC_FLOAT32:
            case MORLOC_FLOAT64: {
                ElemT* arr_start = (ElemT*)resolve_relptr_cpp(array->data, base_ptr);
                std::vector<ElemT> pv(arr_start, arr_start + array->size);
                return pv;
            }
        }

        // Complex element types
        result.reserve(array->size);
        const Schema* elem_schema = schema->parameters[0];
        char* start = (char*)resolve_relptr_cpp(array->data, base_ptr);
        for(size_t i = 0; i < array->size; i++){
            result.push_back(fromAnything(elem_schema, (void*)(start + i * elem_schema->width), static_cast<ElemT*>(nullptr), base_ptr));
        }
        return result;
    }
    else if constexpr (is_non_vector_container_v<T>) {
        using ElemT = typename T::value_type;
        Array* array = (Array*)data;
        T result;
        if(array->size == 0) return result;

        const Schema* elem_schema = schema->parameters[0];
        char* start = (char*)resolve_relptr_cpp(array->data, base_ptr);

        constexpr bool reverse = is_std_stack<T>::value || is_std_forward_list<T>::value;

        if constexpr (reverse) {
            for (size_t i = array->size; i > 0; --i) {
                auto elem = fromAnything(elem_schema, (void*)(start + (i-1) * elem_schema->width), static_cast<ElemT*>(nullptr), base_ptr);
                if constexpr (is_std_stack<T>::value) result.push(std::move(elem));
                else result.push_front(std::move(elem));
            }
        } else {
            for (size_t i = 0; i < array->size; ++i) {
                auto elem = fromAnything(elem_schema, (void*)(start + i * elem_schema->width), static_cast<ElemT*>(nullptr), base_ptr);
                if constexpr (is_std_queue<T>::value) result.push(std::move(elem));
                else result.push_back(std::move(elem));
            }
        }
        return result;
    }
    else if constexpr (is_std_tuple<T>::value) {
        return fromTupleAnythingHelper(
            schema, data,
            std::make_index_sequence<std::tuple_size_v<T>>{},
            static_cast<T*>(nullptr),
            base_ptr
        );
    }
    else if constexpr (is_std_pair<T>::value) {
        return fromTupleAnythingHelper(
            schema, data,
            std::index_sequence<0, 1>{},
            static_cast<T*>(nullptr),
            base_ptr
        );
    }
    else if constexpr (is_std_optional<T>::value) {
        using InnerT = typename T::value_type;
        uint8_t tag = *(const uint8_t*)data;
        if (tag == 0) {
            return std::nullopt;
        }
        return std::optional<InnerT>(fromAnything(schema->parameters[0], (const char*)data + schema->offsets[0], static_cast<InnerT*>(nullptr), base_ptr));
    }
    else if constexpr (mlc::is_mlc_tensor_v<T>) {
        using ElemT = mlc::tensor_element_t<T>;
        using StorageT = mlc::tensor_storage_t<ElemT>;
        constexpr int NDim = mlc::tensor_ndim_v<T>;
        const Tensor* tensor = (const Tensor*)data;

        if (tensor->total_elements == 0) {
            int64_t zero_shape[NDim] = {};
            return T(zero_shape);
        }

        const int64_t* shape = (const int64_t*)resolve_relptr_cpp(tensor->shape, base_ptr);
        StorageT* tdata = (StorageT*)resolve_relptr_cpp(tensor->data, base_ptr);
        return T(tdata, shape, tensor->total_elements);
    }
    else {
        // Primitives (int, double, float, etc.)
        // Record types are handled by generated overloads which are preferred
        // by overload resolution over this template.
        return *(T*)data;
    }
}


// ============================================================
// mpk_pack / mpk_unpack
// ============================================================

template<typename T>
std::vector<char> mpk_pack(const T& data, const std::string& schema_str) {
    const char* schema_ptr = schema_str.c_str();
    Schema* schema = parse_schema_cpp(schema_ptr);

    void* voidstar = nullptr;
    char* msgpack_data = NULL;
    size_t msg_size = 0;

    try {
        voidstar = toAnything(schema, data);
        pack_with_schema_cpp(voidstar, schema, &msgpack_data, &msg_size);
    } catch (...) {
        if (voidstar) shfree_cpp(voidstar);
        free(msgpack_data);
        free_schema(schema);
        throw;
    }

    shfree_cpp(voidstar);

    std::vector<char> result(msgpack_data, msgpack_data + msg_size);
    free(msgpack_data);
    free_schema(schema);

    return result;
}

template<typename T>
T mpk_unpack(const std::vector<char>& packed_data, const std::string& schema_str) {
    const char* schema_ptr = schema_str.c_str();
    Schema* schema = parse_schema_cpp(schema_ptr);

    void* voidstar = nullptr;
    int unpack_result = unpack_with_schema_cpp(packed_data.data(), packed_data.size(), schema, &voidstar);
    if (unpack_result != 0) {
        free_schema(schema);
        throw std::runtime_error("Unpacking failed");
    }

    T x;
    try {
        x = fromAnything(schema, voidstar, static_cast<T*>(nullptr));
    } catch (...) {
        free_schema(schema);
        shfree_cpp(voidstar);
        throw;
    }

    free_schema(schema);
    shfree_cpp(voidstar);

    return x;
}

#endif


================================================
FILE: data/lang/cpp/init.sh
================================================
#!/bin/bash
set -e

MORLOC_HOME="$1"
BUILD_DIR="$2"
SANITIZE_FLAGS="$3"
INCLUDE_DIR="$MORLOC_HOME/include"
LIB_DIR="$MORLOC_HOME/lib"

# Install mlccpptypes if not present
if [ ! -d "$INCLUDE_DIR/mlccpptypes" ]; then
    git clone https://github.com/morloclib/mlccpptypes "$INCLUDE_DIR/mlccpptypes"
fi

# Install headers
cp "$BUILD_DIR/cppmorloc.hpp" "$INCLUDE_DIR/"
cp "$BUILD_DIR/mlc_arrow.hpp" "$INCLUDE_DIR/"
cp "$BUILD_DIR/mlc_tensor.hpp" "$INCLUDE_DIR/"

# Install nanoarrow headers
mkdir -p "$INCLUDE_DIR/nanoarrow"
cp "$BUILD_DIR/nanoarrow.h" "$INCLUDE_DIR/nanoarrow/"

# Compile nanoarrow.c
gcc -c -O2 -fPIC $SANITIZE_FLAGS -I"$INCLUDE_DIR" -o "$BUILD_DIR/nanoarrow.o" "$BUILD_DIR/nanoarrow.c"

# Compile cppmorloc.cpp
g++ -c --std=c++17 -O2 $SANITIZE_FLAGS -I"$INCLUDE_DIR" -o "$BUILD_DIR/cppmorloc.o" "$BUILD_DIR/cppmorloc.cpp"

# Archive into libcppmorloc.a
ar rcs "$LIB_DIR/libcppmorloc.a" "$BUILD_DIR/cppmorloc.o" "$BUILD_DIR/nanoarrow.o"

# Compile precompiled header
cp "$BUILD_DIR/morloc_pch.hpp" "$INCLUDE_DIR/"
g++ --std=c++17 -O2 $SANITIZE_FLAGS -I"$INCLUDE_DIR" -x c++-header "$INCLUDE_DIR/morloc_pch.hpp" -o "$INCLUDE_DIR/morloc_pch.hpp.gch"


================================================
FILE: data/lang/cpp/lang.yaml
================================================
# C++ language metadata for morloc compiler
name: cpp
extension: cpp
aliases: ["c++"]
is_compiled: true
run_command: []
serial_type: "uint8_t*"
cost: 0


================================================
FILE: data/lang/cpp/mlc_arrow.hpp
================================================
#ifndef MLC_ARROW_HPP
#define MLC_ARROW_HPP

// mlc_arrow.hpp -- thin RAII wrapper around Arrow C Data Interface structs
// for use in morloc C++ pools.  Holds ArrowSchema + ArrowArray as a single
// move-only value.  The pool template dispatches arrow-hinted schemas to
// arrow_to_shm / arrow_from_shm (in libmorloc.so) via this type.
//
// User code should include <nanoarrow/nanoarrow.h> to build and read columns.

#include "morloc.h"
#include <cstring>
#include <stdexcept>
#include <utility>

namespace mlc {

class ArrowTable {
public:
    // Construct from moved-in C Data Interface structs.
    // Takes ownership of release callbacks.
    ArrowTable(struct ArrowSchema schema, struct ArrowArray array)
        : schema_(schema), array_(array)
    {
        // Zero the source structs so the caller does not double-release
        memset(&schema, 0, sizeof(schema));
        memset(&array, 0, sizeof(array));
    }

    ~ArrowTable() {
        if (array_.release) array_.release(&array_);
        if (schema_.release) schema_.release(&schema_);
    }

    // Move-only
    ArrowTable(ArrowTable&& other) noexcept
        : schema_(other.schema_), array_(other.array_)
    {
        memset(&other.schema_, 0, sizeof(other.schema_));
        memset(&other.array_, 0, sizeof(other.array_));
    }

    ArrowTable& operator=(ArrowTable&& other) noexcept {
        if (this != &other) {
            if (array_.release) array_.release(&array_);
            if (schema_.release) schema_.release(&schema_);
            schema_ = other.schema_;
            array_ = other.array_;
            memset(&other.schema_, 0, sizeof(other.schema_));
            memset(&other.array_, 0, sizeof(other.array_));
        }
        return *this;
    }

    ArrowTable(const ArrowTable&) = delete;
    ArrowTable& operator=(const ArrowTable&) = delete;

    // Accessors (const -- arrow data is immutable)
    const struct ArrowSchema* schema() const { return &schema_; }
    const struct ArrowArray*  array()  const { return &array_; }
    int64_t n_columns() const { return schema_.n_children; }
    int64_t n_rows()    const { return array_.length; }

    // Build from shared memory header (zero-copy import)
    static ArrowTable from_shm(const arrow_shm_header_t* hdr) {
        struct ArrowSchema as;
        struct ArrowArray aa;
        char* err = nullptr;
        arrow_from_shm(hdr, &as, &aa, &err);
        if (err) {
            std::string msg(err);
            free(err);
            throw std::runtime_error(msg);
        }
        return ArrowTable(std::move(as), std::move(aa));
    }

    // Move table data to shared memory: copies buffers into a contiguous SHM
    // block, frees the original heap buffers, then repoints this table's
    // internal ArrowSchema/ArrowArray into the SHM block (zero-copy).
    // After this call the table is still usable but backed by SHM.
    // Returns relptr to the SHM block for use in packets.
    relptr_t move_to_shm() {
        // Step 1: copy all column data into contiguous SHM
        char* copy_err = nullptr;
        relptr_t rp = arrow_to_shm(&array_, &schema_, &copy_err);
        if (copy_err) {
            std::string msg(copy_err);
            free(copy_err);
            throw std::runtime_error(msg);
        }

        // Step 2: release heap-backed structs (frees all original buffers)
        if (array_.release) array_.release(&array_);
        if (schema_.release) schema_.release(&schema_);
        memset(&schema_, 0, sizeof(schema_));
        memset(&array_, 0, sizeof(array_));

        // Step 3: resolve SHM pointer and rebuild structs pointing into it
        char* resolve_err = nullptr;
        void* abs = rel2abs(rp, &resolve_err);
        if (resolve_err) {
            std::string msg(resolve_err);
            free(resolve_err);
            throw std::runtime_error(msg);
        }

        char* shm_err = nullptr;
        arrow_from_shm((const arrow_shm_header_t*)abs, &schema_, &array_, &shm_err);
        if (shm_err) {
            std::string msg(shm_err);
            free(shm_err);
            throw std::runtime_error(msg);
        }

        return rp;
    }

private:
    struct ArrowSchema schema_;
    struct ArrowArray array_;
};

} // namespace mlc

#endif // MLC_ARROW_HPP


================================================
FILE: data/lang/cpp/mlc_tensor.hpp
================================================
#ifndef MLC_TENSOR_HPP
#define MLC_TENSOR_HPP

// mlc_tensor.hpp -- dense N-dimensional tensor for morloc C++ pools.
// Data is always contiguous row-major (C order). The Tensor struct in
// schema.h defines the voidstar layout; this header provides the C++
// user-facing type that maps to it.

#include "morloc.h"
#include <cstring>
#include <stdexcept>
#include <numeric>
#include <initializer_list>

namespace mlc {

// Storage type trait: maps bool to uint8_t so that tensor memory layout
// matches the voidstar format (MORLOC_BOOL = 1 byte) regardless of
// sizeof(bool) on the target platform.
template<typename T> struct tensor_storage { using type = T; };
template<> struct tensor_storage<bool> { using type = uint8_t; };
template<typename T> using tensor_storage_t = typename tensor_storage<T>::type;

template<typename T, int NDim>
class Tensor {
    using S = tensor_storage_t<T>;
public:
    // Construct with given shape, allocating data on the heap
    Tensor(const int64_t (&dims)[NDim]) : owns_data_(true) {
        for (int i = 0; i < NDim; i++) shape_[i] = dims[i];
        total_ = 1;
        for (int i = 0; i < NDim; i++) total_ *= (size_t)shape_[i];
        data_ = new S[total_]();
    }

    // Construct from initializer list of dims
    Tensor(std::initializer_list<int64_t> dims) : owns_data_(true) {
        if ((int)dims.size() != NDim) {
            throw std::runtime_error("Tensor dimension mismatch");
        }
        int i = 0;
        for (auto d : dims) shape_[i++] = d;
        total_ = 1;
        for (i = 0; i < NDim; i++) total_ *= (size_t)shape_[i];
        data_ = new S[total_]();
    }

    // Construct as a view over existing data (does not own)
    Tensor(S* data, const int64_t* shape, size_t total)
        : data_(data), total_(total), owns_data_(false) {
        for (int i = 0; i < NDim; i++) shape_[i] = shape[i];
    }

    ~Tensor() {
        if (owns_data_ && data_) delete[] data_;
    }

    // Move-only
    Tensor(Tensor&& other) noexcept
        : data_(other.data_), total_(other.total_), owns_data_(other.owns_data_) {
        for (int i = 0; i < NDim; i++) shape_[i] = other.shape_[i];
        other.data_ = nullptr;
        other.owns_data_ = false;
    }

    Tensor& operator=(Tensor&& other) noexcept {
        if (this != &other) {
            if (owns_data_ && data_) delete[] data_;
            data_ = other.data_;
            total_ = other.total_;
            owns_data_ = other.owns_data_;
            for (int i = 0; i < NDim; i++) shape_[i] = other.shape_[i];
            other.data_ = nullptr;
            other.owns_data_ = false;
        }
        return *this;
    }

    Tensor(const Tensor&) = delete;
    Tensor& operator=(const Tensor&) = delete;

    // Accessors (S* for raw access; S == T for all types except bool)
    const S* data() const { return data_; }
    S* data() { return data_; }
    constexpr int ndim() const { return NDim; }
    const int64_t* shape() const { return shape_; }
    int64_t shape(int d) const { return shape_[d]; }
    size_t size() const { return total_; }

    // Linear access (returns S& which is uint8_t& for bool tensors;
    // implicit conversion to/from bool handles the difference)
    const S& operator[](size_t i) const { return data_[i]; }
    S& operator[](size_t i) { return data_[i]; }

    // 1D access
    template<int N = NDim, typename = std::enable_if_t<N == 1>>
    const S& operator()(int64_t i) const { return data_[i]; }
    template<int N = NDim, typename = std::enable_if_t<N == 1>>
    S& operator()(int64_t i) { return data_[i]; }

    // 2D access (row-major)
    template<int N = NDim, typename = std::enable_if_t<N == 2>>
    const S& operator()(int64_t i, int64_t j) const {
        return data_[i * shape_[1] + j];
    }
    template<int N = NDim, typename = std::enable_if_t<N == 2>>
    S& operator()(int64_t i, int64_t j) {
        return data_[i * shape_[1] + j];
    }

    // 3D access (row-major)
    template<int N = NDim, typename = std::enable_if_t<N == 3>>
    const S& operator()(int64_t i, int64_t j, int64_t k) const {
        return data_[(i * shape_[1] + j) * shape_[2] + k];
    }
    template<int N = NDim, typename = std::enable_if_t<N == 3>>
    S& operator()(int64_t i, int64_t j, int64_t k) {
        return data_[(i * shape_[1] + j) * shape_[2] + k];
    }

private:
    S* data_ = nullptr;
    int64_t shape_[NDim] = {};
    size_t total_ = 0;
    bool owns_data_ = false;
};

// Convenience aliases
template<typename T> using Tensor1 = Tensor<T, 1>;
template<typename T> using Tensor2 = Tensor<T, 2>;
template<typename T> using Tensor3 = Tensor<T, 3>;
template<typename T> using Tensor4 = Tensor<T, 4>;
template<typename T> using Tensor5 = Tensor<T, 5>;

// Type trait for detecting mlc::Tensor
template<typename T> struct is_mlc_tensor : std::false_type {};
template<typename T, int N> struct is_mlc_tensor<Tensor<T, N>> : std::true_type {};
template<typename T>
inline constexpr bool is_mlc_tensor_v = is_mlc_tensor<T>::value;

// Extract element type from Tensor
template<typename T> struct tensor_element;
template<typename T, int N> struct tensor_element<Tensor<T, N>> { using type = T; };
template<typename T> using tensor_element_t = typename tensor_element<T>::type;

// Extract ndim from Tensor
template<typename T> struct tensor_ndim;
template<typename T, int N> struct tensor_ndim<Tensor<T, N>>
    { static constexpr int value = N; };
template<typename T>
inline constexpr int tensor_ndim_v = tensor_ndim<T>::value;

} // namespace mlc

#endif // MLC_TENSOR_HPP


================================================
FILE: data/lang/cpp/morloc_pch.hpp
================================================
// Precompiled header for morloc C++ pools.
// Compiled once during 'morloc init', reused for every pool compilation.

#ifndef MORLOC_PCH_HPP
#define MORLOC_PCH_HPP

// STL containers
#include <vector>
#include <stack>
#include <list>
#include <forward_list>
#include <queue>
#include <deque>
#include <unordered_map>

// STL algorithms and utilities
#include <algorithm>
#include <tuple>
#include <functional>
#include <limits>
#include <utility>
#include <type_traits>

// Strings and I/O
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>

// C standard library
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cstdint>
#include <stdexcept>
#include <system_error>

// POSIX headers
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>

// Morloc runtime
#include "morloc.h"

#endif


================================================
FILE: data/lang/cpp/nanoarrow/nanoarrow.c
================================================
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "nanoarrow/nanoarrow.h"

const char* ArrowNanoarrowVersion(void) { return NANOARROW_VERSION; }

int ArrowNanoarrowVersionInt(void) { return NANOARROW_VERSION_INT; }

ArrowErrorCode ArrowErrorSet(struct ArrowError* error, const char* fmt, ...) {
  if (error == NULL) {
    return NANOARROW_OK;
  }

  memset(error->message, 0, sizeof(error->message));

  va_list args;
  va_start(args, fmt);
  int chars_needed = vsnprintf(error->message, sizeof(error->message), fmt, args);
  va_end(args);

  if (chars_needed < 0) {
    return EINVAL;
  } else if (((size_t)chars_needed) >= sizeof(error->message)) {
    return ERANGE;
  } else {
    return NANOARROW_OK;
  }
}

void ArrowLayoutInit(struct ArrowLayout* layout, enum ArrowType storage_type) {
  layout->buffer_type[0] = NANOARROW_BUFFER_TYPE_VALIDITY;
  layout->buffer_data_type[0] = NANOARROW_TYPE_BOOL;
  layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA;
  layout->buffer_data_type[1] = storage_type;
  layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_NONE;
  layout->buffer_data_type[2] = NANOARROW_TYPE_UNINITIALIZED;

  layout->element_size_bits[0] = 1;
  layout->element_size_bits[1] = 0;
  layout->element_size_bits[2] = 0;

  layout->child_size_elements = 0;

  switch (storage_type) {
    case NANOARROW_TYPE_UNINITIALIZED:
    case NANOARROW_TYPE_NA:
    case NANOARROW_TYPE_RUN_END_ENCODED:
      layout->buffer_type[0] = NANOARROW_BUFFER_TYPE_NONE;
      layout->buffer_data_type[0] = NANOARROW_TYPE_UNINITIALIZED;
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_NONE;
      layout->buffer_data_type[1] = NANOARROW_TYPE_UNINITIALIZED;
      layout->element_size_bits[0] = 0;
      break;

    case NANOARROW_TYPE_LIST:
    case NANOARROW_TYPE_MAP:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT32;
      layout->element_size_bits[1] = 32;
      break;

    case NANOARROW_TYPE_LARGE_LIST:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT64;
      layout->element_size_bits[1] = 64;
      break;

    case NANOARROW_TYPE_STRUCT:
    case NANOARROW_TYPE_FIXED_SIZE_LIST:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_NONE;
      layout->buffer_data_type[1] = NANOARROW_TYPE_UNINITIALIZED;
      break;

    case NANOARROW_TYPE_BOOL:
      layout->element_size_bits[1] = 1;
      break;

    case NANOARROW_TYPE_UINT8:
    case NANOARROW_TYPE_INT8:
      layout->element_size_bits[1] = 8;
      break;

    case NANOARROW_TYPE_UINT16:
    case NANOARROW_TYPE_INT16:
    case NANOARROW_TYPE_HALF_FLOAT:
      layout->element_size_bits[1] = 16;
      break;

    case NANOARROW_TYPE_UINT32:
    case NANOARROW_TYPE_INT32:
    case NANOARROW_TYPE_FLOAT:
    case NANOARROW_TYPE_DECIMAL32:
      layout->element_size_bits[1] = 32;
      break;
    case NANOARROW_TYPE_INTERVAL_MONTHS:
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT32;
      layout->element_size_bits[1] = 32;
      break;

    case NANOARROW_TYPE_UINT64:
    case NANOARROW_TYPE_INT64:
    case NANOARROW_TYPE_DOUBLE:
    case NANOARROW_TYPE_INTERVAL_DAY_TIME:
    case NANOARROW_TYPE_DECIMAL64:
      layout->element_size_bits[1] = 64;
      break;

    case NANOARROW_TYPE_DECIMAL128:
    case NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO:
      layout->element_size_bits[1] = 128;
      break;

    case NANOARROW_TYPE_DECIMAL256:
      layout->element_size_bits[1] = 256;
      break;

    case NANOARROW_TYPE_FIXED_SIZE_BINARY:
      layout->buffer_data_type[1] = NANOARROW_TYPE_BINARY;
      break;

    case NANOARROW_TYPE_DENSE_UNION:
      layout->buffer_type[0] = NANOARROW_BUFFER_TYPE_TYPE_ID;
      layout->buffer_data_type[0] = NANOARROW_TYPE_INT8;
      layout->element_size_bits[0] = 8;
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_UNION_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT32;
      layout->element_size_bits[1] = 32;
      break;

    case NANOARROW_TYPE_SPARSE_UNION:
      layout->buffer_type[0] = NANOARROW_BUFFER_TYPE_TYPE_ID;
      layout->buffer_data_type[0] = NANOARROW_TYPE_INT8;
      layout->element_size_bits[0] = 8;
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_NONE;
      layout->buffer_data_type[1] = NANOARROW_TYPE_UNINITIALIZED;
      break;

    case NANOARROW_TYPE_STRING:
    case NANOARROW_TYPE_BINARY:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT32;
      layout->element_size_bits[1] = 32;
      layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_DATA;
      layout->buffer_data_type[2] = storage_type;
      break;

    case NANOARROW_TYPE_LARGE_STRING:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT64;
      layout->element_size_bits[1] = 64;
      layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_DATA;
      layout->buffer_data_type[2] = NANOARROW_TYPE_STRING;
      break;
    case NANOARROW_TYPE_LARGE_BINARY:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT64;
      layout->element_size_bits[1] = 64;
      layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_DATA;
      layout->buffer_data_type[2] = NANOARROW_TYPE_BINARY;
      break;

    case NANOARROW_TYPE_BINARY_VIEW:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA;
      layout->buffer_data_type[1] = NANOARROW_TYPE_BINARY_VIEW;
      layout->element_size_bits[1] = 128;
      break;
    case NANOARROW_TYPE_STRING_VIEW:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA;
      layout->buffer_data_type[1] = NANOARROW_TYPE_STRING_VIEW;
      layout->element_size_bits[1] = 128;
      break;

    case NANOARROW_TYPE_LIST_VIEW:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_VIEW_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT32;
      layout->element_size_bits[1] = 32;
      layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_SIZE;
      layout->buffer_data_type[2] = NANOARROW_TYPE_INT32;
      layout->element_size_bits[2] = 32;
      break;
    case NANOARROW_TYPE_LARGE_LIST_VIEW:
      layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_VIEW_OFFSET;
      layout->buffer_data_type[1] = NANOARROW_TYPE_INT64;
      layout->element_size_bits[1] = 64;
      layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_SIZE;
      layout->buffer_data_type[2] = NANOARROW_TYPE_INT64;
      layout->element_size_bits[2] = 64;
      break;

    default:
      break;
  }
}

void* ArrowMalloc(int64_t size) { return malloc(size); }

void* ArrowRealloc(void* ptr, int64_t size) { return realloc(ptr, size); }

void ArrowFree(void* ptr) { free(ptr); }

static uint8_t* ArrowBufferAllocatorMallocReallocate(
    struct ArrowBufferAllocator* allocator, uint8_t* ptr, int64_t old_size,
    int64_t new_size) {
  NANOARROW_UNUSED(allocator);
  NANOARROW_UNUSED(old_size);
  return (uint8_t*)ArrowRealloc(ptr, new_size);
}

static void ArrowBufferAllocatorMallocFree(struct ArrowBufferAllocator* allocator,
                                           uint8_t* ptr, int64_t size) {
  NANOARROW_UNUSED(allocator);
  NANOARROW_UNUSED(size);
  if (ptr != NULL) {
    ArrowFree(ptr);
  }
}

static struct ArrowBufferAllocator ArrowBufferAllocatorMalloc = {
    &ArrowBufferAllocatorMallocReallocate, &ArrowBufferAllocatorMallocFree, NULL};

struct ArrowBufferAllocator ArrowBufferAllocatorDefault(void) {
  return ArrowBufferAllocatorMalloc;
}

static uint8_t* ArrowBufferDeallocatorReallocate(struct ArrowBufferAllocator* allocator,
                                                 uint8_t* ptr, int64_t old_size,
                                                 int64_t new_size) {
  NANOARROW_UNUSED(new_size);

  // Attempting to reallocate a buffer with a custom deallocator is
  // a programming error. In debug mode, crash here.
#if defined(NANOARROW_DEBUG)
  NANOARROW_PRINT_AND_DIE(ENOMEM,
                          "It is an error to reallocate a buffer whose allocator is "
                          "ArrowBufferDeallocator()");
#endif

  // In release mode, ensure the the deallocator is called exactly
  // once using the pointer it was given and return NULL, which
  // will trigger the caller to return ENOMEM.
  allocator->free(allocator, ptr, old_size);
  *allocator = ArrowBufferAllocatorDefault();
  return NULL;
}

struct ArrowBufferAllocator ArrowBufferDeallocator(
    void (*custom_free)(struct ArrowBufferAllocator* allocator, uint8_t* ptr,
                        int64_t size),
    void* private_data) {
  struct ArrowBufferAllocator allocator;
  allocator.reallocate = &ArrowBufferDeallocatorReallocate;
  allocator.free = custom_free;
  allocator.private_data = private_data;
  return allocator;
}

static const int kInt32DecimalDigits = 9;

static const uint64_t kUInt32PowersOfTen[] = {
    1ULL,      10ULL,      100ULL,      1000ULL,      10000ULL,
    100000ULL, 1000000ULL, 10000000ULL, 100000000ULL, 1000000000ULL};

// Adapted from Arrow C++ to use 32-bit words for better C portability
// https://github.com/apache/arrow/blob/cd3321b28b0c9703e5d7105d6146c1270bbadd7f/cpp/src/arrow/util/decimal.cc#L524-L544
static void ShiftAndAdd(struct ArrowStringView value, uint32_t* out, int64_t out_size) {
  // We use strtoll for parsing, which needs input that is null-terminated
  char chunk_string[16];

  for (int64_t posn = 0; posn < value.size_bytes;) {
    int64_t remaining = value.size_bytes - posn;

    int64_t group_size;
    if (remaining > kInt32DecimalDigits) {
      group_size = kInt32DecimalDigits;
    } else {
      group_size = remaining;
    }

    const uint64_t multiple = kUInt32PowersOfTen[group_size];

    memcpy(chunk_string, value.data + posn, group_size);
    chunk_string[group_size] = '\0';
    uint32_t chunk = (uint32_t)strtoll(chunk_string, NULL, 10);

    for (int64_t i = 0; i < out_size; i++) {
      uint64_t tmp = out[i];
      tmp *= multiple;
      tmp += chunk;
      out[i] = (uint32_t)(tmp & 0xFFFFFFFFULL);
      chunk = (uint32_t)(tmp >> 32);
    }
    posn += group_size;
  }
}

ArrowErrorCode ArrowDecimalSetDigits(struct ArrowDecimal* decimal,
                                     struct ArrowStringView value) {
  // Check for sign
  int is_negative = value.data[0] == '-';
  int has_sign = is_negative || value.data[0] == '+';
  value.data += has_sign;
  value.size_bytes -= has_sign;

  // Check all characters are digits that are not the negative sign
  for (int64_t i = 0; i < value.size_bytes; i++) {
    char c = value.data[i];
    if (c < '0' || c > '9') {
      return EINVAL;
    }
  }

  // Skip over leading 0s
  int64_t n_leading_zeroes = 0;
  for (int64_t i = 0; i < value.size_bytes; i++) {
    if (value.data[i] == '0') {
      n_leading_zeroes++;
    } else {
      break;
    }
  }

  value.data += n_leading_zeroes;
  value.size_bytes -= n_leading_zeroes;

  // Use 32-bit words for portability
  uint32_t words32[8];
  memset(words32, 0, sizeof(words32));
  int n_words32 = decimal->n_words > 0 ? decimal->n_words * 2 : 1;
  NANOARROW_DCHECK(n_words32 <= 8);
  memset(words32, 0, sizeof(words32));

  ShiftAndAdd(value, words32, n_words32);

  if (_ArrowIsLittleEndian() || n_words32 == 1) {
    memcpy(decimal->words, words32, sizeof(uint32_t) * n_words32);
  } else {
    uint64_t lo;
    uint64_t hi;

    for (int i = 0; i < decimal->n_words; i++) {
      lo = (uint64_t)words32[i * 2];
      hi = (uint64_t)words32[i * 2 + 1] << 32;
      decimal->words[decimal->n_words - i - 1] = lo | hi;
    }
  }

  if (is_negative) {
    ArrowDecimalNegate(decimal);
  }

  return NANOARROW_OK;
}

// Adapted from Arrow C++ for C
// https://github.com/apache/arrow/blob/cd3321b28b0c9703e5d7105d6146c1270bbadd7f/cpp/src/arrow/util/decimal.cc#L365
ArrowErrorCode ArrowDecimalAppendDigitsToBuffer(const struct ArrowDecimal* decimal,
                                                struct ArrowBuffer* buffer) {
  NANOARROW_DCHECK(decimal->n_words == 0 || decimal->n_words == 1 ||
                   decimal->n_words == 2 || decimal->n_words == 4);

  // For the 32-bit case, just use snprintf()
  if (decimal->n_words == 0) {
    int32_t value;
    memcpy(&value, decimal->words, sizeof(int32_t));
    NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(buffer, 16));
    int n_chars = snprintf((char*)buffer->data + buffer->size_bytes,
                           (buffer->capacity_bytes - buffer->size_bytes), "%d", value);
    if (n_chars <= 0) {
      return EINVAL;
    }

    buffer->size_bytes += n_chars;
    return NANOARROW_OK;
  }

  int is_negative = ArrowDecimalSign(decimal) < 0;

  uint64_t words_little_endian[4];
  if (decimal->n_words == 0) {
    words_little_endian[0] = 0;
    memcpy(words_little_endian, decimal->words, sizeof(uint32_t));
  } else if (decimal->low_word_index == 0) {
    memcpy(words_little_endian, decimal->words, decimal->n_words * sizeof(uint64_t));
  } else {
    for (int i = 0; i < decimal->n_words; i++) {
      words_little_endian[i] = decimal->words[decimal->n_words - i - 1];
    }
  }

  // We've already made a copy, so negate that if needed
  if (is_negative) {
    if (decimal->n_words == 0) {
      uint32_t elem = (uint32_t)words_little_endian[0];
      elem = ~elem + 1;
      words_little_endian[0] = (int32_t)elem;
    } else {
      uint64_t carry = 1;
      for (int i = 0; i < decimal->n_words; i++) {
        uint64_t elem = words_little_endian[i];
        elem = ~elem + carry;
        carry &= (elem == 0);
        words_little_endian[i] = elem;
      }
    }
  }

  // Find the most significant word that is non-zero
  int most_significant_elem_idx = -1;
  if (decimal->n_words == 0) {
    if (words_little_endian[0] != 0) {
      most_significant_elem_idx = 0;
    }
  } else {
    for (int i = decimal->n_words - 1; i >= 0; i--) {
      if (words_little_endian[i] != 0) {
        most_significant_elem_idx = i;
        break;
      }
    }
  }

  // If they are all zero, the output is just '0'
  if (most_significant_elem_idx == -1) {
    NANOARROW_RETURN_NOT_OK(ArrowBufferAppendInt8(buffer, '0'));
    return NANOARROW_OK;
  }

  // Define segments such that each segment represents 9 digits with the
  // least significant group of 9 digits first. For example, if the input represents
  // 9876543210123456789, then segments will be [123456789, 876543210, 9].
  // We handle at most a signed 256 bit integer, whose maximum value occupies 77
  // characters. Thus, we need at most 9 segments.
  const uint32_t k1e9 = 1000000000U;
  int num_segments = 0;
  uint32_t segments[9];
  memset(segments, 0, sizeof(segments));
  uint64_t* most_significant_elem = words_little_endian + most_significant_elem_idx;

  do {
    // Compute remainder = words_little_endian % 1e9 and words_little_endian =
    // words_little_endian / 1e9.
    uint32_t remainder = 0;
    uint64_t* elem = most_significant_elem;

    do {
      // Compute dividend = (remainder << 32) | *elem  (a virtual 96-bit integer);
      // *elem = dividend / 1e9;
      // remainder = dividend % 1e9.
      uint32_t hi = (uint32_t)(*elem >> 32);
      uint32_t lo = (uint32_t)(*elem & 0xFFFFFFFFULL);
      uint64_t dividend_hi = ((uint64_t)(remainder) << 32) | hi;
      uint64_t quotient_hi = dividend_hi / k1e9;
      remainder = (uint32_t)(dividend_hi % k1e9);
      uint64_t dividend_lo = ((uint64_t)(remainder) << 32) | lo;
      uint64_t quotient_lo = dividend_lo / k1e9;
      remainder = (uint32_t)(dividend_lo % k1e9);

      *elem = (quotient_hi << 32) | quotient_lo;
    } while (elem-- != words_little_endian);

    segments[num_segments++] = remainder;
  } while (*most_significant_elem != 0 || most_significant_elem-- != words_little_endian);

  // We know our output has no more than 9 digits per segment, plus a negative sign,
  // plus any further digits between our output of 9 digits plus enough
  // extra characters to ensure that snprintf() with n = 21 (maximum length of %lu
  // including a the null terminator) is bounded properly.
  NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(buffer, num_segments * 9 + 1 + 21 - 9));
  if (is_negative) {
    buffer->data[buffer->size_bytes++] = '-';
  }

  // The most significant segment should have no leading zeroes
  int n_chars = snprintf((char*)buffer->data + buffer->size_bytes, 21, "%lu",
                         (unsigned long)segments[num_segments - 1]);

  // Ensure that an encoding error from snprintf() does not result
  // in an out-of-bounds access.
  if (n_chars < 0) {
    return ERANGE;
  }

  buffer->size_bytes += n_chars;

  // Subsequent output needs to be left-padded with zeroes such that each segment
  // takes up exactly 9 digits.
  for (int i = num_segments - 2; i >= 0; i--) {
    int n_chars = snprintf((char*)buffer->data + buffer->size_bytes, 21, "%09lu",
                           (unsigned long)segments[i]);
    buffer->size_bytes += n_chars;
    NANOARROW_DCHECK(buffer->size_bytes <= buffer->capacity_bytes);
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowDecimalAppendStringToBuffer(const struct ArrowDecimal* decimal,
                                                struct ArrowBuffer* buffer) {
  int64_t buffer_size = buffer->size_bytes;
  NANOARROW_RETURN_NOT_OK(ArrowDecimalAppendDigitsToBuffer(decimal, buffer));
  int64_t digits_size = buffer->size_bytes - buffer_size;

  if (decimal->scale <= 0) {
    // e.g., digits are -12345 and scale is -2 -> -1234500
    // Just add zeros to the end
    for (int i = decimal->scale; i < 0; i++) {
      NANOARROW_RETURN_NOT_OK(ArrowBufferAppendInt8(buffer, '0'));
    }
    return NANOARROW_OK;
  }

  int is_negative = buffer->data[0] == '-';
  int64_t num_digits = digits_size - is_negative;
  if (num_digits <= decimal->scale) {
    // e.g., digits are -12345 and scale is 6 -> -0.012345
    // Insert "0.<some zeros>" between the (maybe) negative sign and the digits
    int64_t num_zeros_after_decimal = decimal->scale - num_digits;
    NANOARROW_RETURN_NOT_OK(
        ArrowBufferResize(buffer, buffer->size_bytes + num_zeros_after_decimal + 2, 0));

    uint8_t* digits_start = buffer->data + is_negative;
    memmove(digits_start + num_zeros_after_decimal + 2, digits_start, num_digits);
    *digits_start++ = '0';
    *digits_start++ = '.';
    for (int i = 0; i < num_zeros_after_decimal; i++) {
      *digits_start++ = '0';
    }

  } else {
    // e.g., digits are -12345 and scale is 4 -> -1.2345
    // Insert a decimal point before scale digits of output
    NANOARROW_RETURN_NOT_OK(ArrowBufferResize(buffer, buffer->size_bytes + 1, 0));
    uint8_t* decimal_point_to_be = buffer->data + buffer->size_bytes - 1 - decimal->scale;
    memmove(decimal_point_to_be + 1, decimal_point_to_be, decimal->scale);
    *decimal_point_to_be = '.';
  }

  return NANOARROW_OK;
}
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "nanoarrow/nanoarrow.h"

static void ArrowSchemaReleaseInternal(struct ArrowSchema* schema) {
  if (schema->format != NULL) ArrowFree((void*)schema->format);
  if (schema->name != NULL) ArrowFree((void*)schema->name);
  if (schema->metadata != NULL) ArrowFree((void*)schema->metadata);

  // This object owns the memory for all the children, but those
  // children may have been generated elsewhere and might have
  // their own release() callback.
  if (schema->children != NULL) {
    for (int64_t i = 0; i < schema->n_children; i++) {
      if (schema->children[i] != NULL) {
        if (schema->children[i]->release != NULL) {
          ArrowSchemaRelease(schema->children[i]);
        }

        ArrowFree(schema->children[i]);
      }
    }

    ArrowFree(schema->children);
  }

  // This object owns the memory for the dictionary but it
  // may have been generated somewhere else and have its own
  // release() callback.
  if (schema->dictionary != NULL) {
    if (schema->dictionary->release != NULL) {
      ArrowSchemaRelease(schema->dictionary);
    }

    ArrowFree(schema->dictionary);
  }

  // private data not currently used
  if (schema->private_data != NULL) {
    ArrowFree(schema->private_data);
  }

  schema->release = NULL;
}

static const char* ArrowSchemaFormatTemplate(enum ArrowType type) {
  switch (type) {
    case NANOARROW_TYPE_UNINITIALIZED:
      return NULL;
    case NANOARROW_TYPE_NA:
      return "n";
    case NANOARROW_TYPE_BOOL:
      return "b";

    case NANOARROW_TYPE_UINT8:
      return "C";
    case NANOARROW_TYPE_INT8:
      return "c";
    case NANOARROW_TYPE_UINT16:
      return "S";
    case NANOARROW_TYPE_INT16:
      return "s";
    case NANOARROW_TYPE_UINT32:
      return "I";
    case NANOARROW_TYPE_INT32:
      return "i";
    case NANOARROW_TYPE_UINT64:
      return "L";
    case NANOARROW_TYPE_INT64:
      return "l";

    case NANOARROW_TYPE_HALF_FLOAT:
      return "e";
    case NANOARROW_TYPE_FLOAT:
      return "f";
    case NANOARROW_TYPE_DOUBLE:
      return "g";

    case NANOARROW_TYPE_STRING:
      return "u";
    case NANOARROW_TYPE_LARGE_STRING:
      return "U";
    case NANOARROW_TYPE_STRING_VIEW:
      return "vu";
    case NANOARROW_TYPE_BINARY:
      return "z";
    case NANOARROW_TYPE_BINARY_VIEW:
      return "vz";
    case NANOARROW_TYPE_LARGE_BINARY:
      return "Z";

    case NANOARROW_TYPE_DATE32:
      return "tdD";
    case NANOARROW_TYPE_DATE64:
      return "tdm";
    case NANOARROW_TYPE_INTERVAL_MONTHS:
      return "tiM";
    case NANOARROW_TYPE_INTERVAL_DAY_TIME:
      return "tiD";
    case NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO:
      return "tin";

    case NANOARROW_TYPE_LIST:
      return "+l";
    case NANOARROW_TYPE_LARGE_LIST:
      return "+L";
    case NANOARROW_TYPE_LIST_VIEW:
      return "+vl";
    case NANOARROW_TYPE_LARGE_LIST_VIEW:
      return "+vL";
    case NANOARROW_TYPE_STRUCT:
      return "+s";
    case NANOARROW_TYPE_MAP:
      return "+m";
    case NANOARROW_TYPE_RUN_END_ENCODED:
      return "+r";

    default:
      return NULL;
  }
}

static int ArrowSchemaInitChildrenIfNeeded(struct ArrowSchema* schema,
                                           enum ArrowType type) {
  switch (type) {
    case NANOARROW_TYPE_LIST:
    case NANOARROW_TYPE_LARGE_LIST:
    case NANOARROW_TYPE_FIXED_SIZE_LIST:
    case NANOARROW_TYPE_LIST_VIEW:
    case NANOARROW_TYPE_LARGE_LIST_VIEW:
      NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema, 1));
      ArrowSchemaInit(schema->children[0]);
      NANOARROW_RETURN_NOT_OK(ArrowSchemaSetName(schema->children[0], "item"));
      break;
    case NANOARROW_TYPE_MAP:
      NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema, 1));
      NANOARROW_RETURN_NOT_OK(
          ArrowSchemaInitFromType(schema->children[0], NANOARROW_TYPE_STRUCT));
      NANOARROW_RETURN_NOT_OK(ArrowSchemaSetName(schema->children[0], "entries"));
      schema->children[0]->flags &= ~ARROW_FLAG_NULLABLE;
      NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema->children[0], 2));
      ArrowSchemaInit(schema->children[0]->children[0]);
      ArrowSchemaInit(schema->children[0]->children[1]);
      NANOARROW_RETURN_NOT_OK(
          ArrowSchemaSetName(schema->children[0]->children[0], "key"));
      schema->children[0]->children[0]->flags &= ~ARROW_FLAG_NULLABLE;
      NANOARROW_RETURN_NOT_OK(
          ArrowSchemaSetName(schema->children[0]->children[1], "value"));
      break;
    case NANOARROW_TYPE_RUN_END_ENCODED:
      NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema, 2));
      ArrowSchemaInit(schema->children[0]);
      NANOARROW_RETURN_NOT_OK(ArrowSchemaSetName(schema->children[0], "run_ends"));
      schema->children[0]->flags &= ~ARROW_FLAG_NULLABLE;
      ArrowSchemaInit(schema->children[1]);
      NANOARROW_RETURN_NOT_OK(ArrowSchemaSetName(schema->children[1], "values"));
    default:
      break;
  }

  return NANOARROW_OK;
}

void ArrowSchemaInit(struct ArrowSchema* schema) {
  schema->format = NULL;
  schema->name = NULL;
  schema->metadata = NULL;
  schema->flags = ARROW_FLAG_NULLABLE;
  schema->n_children = 0;
  schema->children = NULL;
  schema->dictionary = NULL;
  schema->private_data = NULL;
  schema->release = &ArrowSchemaReleaseInternal;
}

ArrowErrorCode ArrowSchemaSetType(struct ArrowSchema* schema, enum ArrowType type) {
  // We don't allocate the dictionary because it has to be nullptr
  // for non-dictionary-encoded arrays.

  // Set the format to a valid format string for type
  const char* template_format = ArrowSchemaFormatTemplate(type);

  // If type isn't recognized and not explicitly unset
  if (template_format == NULL && type != NANOARROW_TYPE_UNINITIALIZED) {
    return EINVAL;
  }

  NANOARROW_RETURN_NOT_OK(ArrowSchemaSetFormat(schema, template_format));

  // For types with an umabiguous child structure, allocate children
  return ArrowSchemaInitChildrenIfNeeded(schema, type);
}

ArrowErrorCode ArrowSchemaSetTypeStruct(struct ArrowSchema* schema, int64_t n_children) {
  NANOARROW_RETURN_NOT_OK(ArrowSchemaSetType(schema, NANOARROW_TYPE_STRUCT));
  NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema, n_children));
  for (int64_t i = 0; i < n_children; i++) {
    ArrowSchemaInit(schema->children[i]);
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaInitFromType(struct ArrowSchema* schema, enum ArrowType type) {
  ArrowSchemaInit(schema);

  int result = ArrowSchemaSetType(schema, type);
  if (result != NANOARROW_OK) {
    ArrowSchemaRelease(schema);
    return result;
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaSetTypeFixedSize(struct ArrowSchema* schema,
                                           enum ArrowType type, int32_t fixed_size) {
  if (fixed_size <= 0) {
    return EINVAL;
  }

  char buffer[64];
  int n_chars;
  switch (type) {
    case NANOARROW_TYPE_FIXED_SIZE_BINARY:
      n_chars = snprintf(buffer, sizeof(buffer), "w:%" PRId32, fixed_size);
      break;
    case NANOARROW_TYPE_FIXED_SIZE_LIST:
      n_chars = snprintf(buffer, sizeof(buffer), "+w:%" PRId32, fixed_size);
      break;
    default:
      return EINVAL;
  }

  if (((size_t)n_chars) >= sizeof(buffer) || n_chars < 0) {
    return ERANGE;
  }

  buffer[n_chars] = '\0';
  NANOARROW_RETURN_NOT_OK(ArrowSchemaSetFormat(schema, buffer));

  if (type == NANOARROW_TYPE_FIXED_SIZE_LIST) {
    NANOARROW_RETURN_NOT_OK(ArrowSchemaInitChildrenIfNeeded(schema, type));
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaSetTypeDecimal(struct ArrowSchema* schema, enum ArrowType type,
                                         int32_t decimal_precision,
                                         int32_t decimal_scale) {
  if (decimal_precision <= 0) {
    return EINVAL;
  }

  char buffer[64];
  int n_chars;
  switch (type) {
    case NANOARROW_TYPE_DECIMAL32:
      if (decimal_precision > 9) {
        return EINVAL;
      }

      n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d,32", decimal_precision,
                         decimal_scale);
      break;
    case NANOARROW_TYPE_DECIMAL64:
      if (decimal_precision > 18) {
        return EINVAL;
      }

      n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d,64", decimal_precision,
                         decimal_scale);
      break;
    case NANOARROW_TYPE_DECIMAL128:
      if (decimal_precision > 38) {
        return EINVAL;
      }

      n_chars =
          snprintf(buffer, sizeof(buffer), "d:%d,%d", decimal_precision, decimal_scale);
      break;
    case NANOARROW_TYPE_DECIMAL256:
      if (decimal_precision > 76) {
        return EINVAL;
      }

      n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d,256", decimal_precision,
                         decimal_scale);
      break;
    default:
      return EINVAL;
  }

  if (((size_t)n_chars) >= sizeof(buffer) || n_chars < 0) {
    return ERANGE;
  }

  buffer[n_chars] = '\0';
  return ArrowSchemaSetFormat(schema, buffer);
}

ArrowErrorCode ArrowSchemaSetTypeRunEndEncoded(struct ArrowSchema* schema,
                                               enum ArrowType run_end_type) {
  switch (run_end_type) {
    case NANOARROW_TYPE_INT16:
    case NANOARROW_TYPE_INT32:
    case NANOARROW_TYPE_INT64:
      break;
    default:
      return EINVAL;
  }

  NANOARROW_RETURN_NOT_OK(ArrowSchemaSetFormat(
      schema, ArrowSchemaFormatTemplate(NANOARROW_TYPE_RUN_END_ENCODED)));
  NANOARROW_RETURN_NOT_OK(
      ArrowSchemaInitChildrenIfNeeded(schema, NANOARROW_TYPE_RUN_END_ENCODED));
  NANOARROW_RETURN_NOT_OK(ArrowSchemaSetType(schema->children[0], run_end_type));
  NANOARROW_RETURN_NOT_OK(
      ArrowSchemaSetType(schema->children[1], NANOARROW_TYPE_UNINITIALIZED));

  return NANOARROW_OK;
}

static const char* ArrowTimeUnitFormatString(enum ArrowTimeUnit time_unit) {
  switch (time_unit) {
    case NANOARROW_TIME_UNIT_SECOND:
      return "s";
    case NANOARROW_TIME_UNIT_MILLI:
      return "m";
    case NANOARROW_TIME_UNIT_MICRO:
      return "u";
    case NANOARROW_TIME_UNIT_NANO:
      return "n";
    default:
      return NULL;
  }
}

ArrowErrorCode ArrowSchemaSetTypeDateTime(struct ArrowSchema* schema, enum ArrowType type,
                                          enum ArrowTimeUnit time_unit,
                                          const char* timezone) {
  const char* time_unit_str = ArrowTimeUnitFormatString(time_unit);
  if (time_unit_str == NULL) {
    return EINVAL;
  }

  char buffer[128];
  int n_chars;
  switch (type) {
    case NANOARROW_TYPE_TIME32:
      if (timezone != NULL) {
        return EINVAL;
      }

      switch (time_unit) {
        case NANOARROW_TIME_UNIT_MICRO:
        case NANOARROW_TIME_UNIT_NANO:
          return EINVAL;
        default:
          break;
      }

      n_chars = snprintf(buffer, sizeof(buffer), "tt%s", time_unit_str);
      break;
    case NANOARROW_TYPE_TIME64:
      if (timezone != NULL) {
        return EINVAL;
      }

      switch (time_unit) {
        case NANOARROW_TIME_UNIT_SECOND:
        case NANOARROW_TIME_UNIT_MILLI:
          return EINVAL;
        default:
          break;
      }

      n_chars = snprintf(buffer, sizeof(buffer), "tt%s", time_unit_str);
      break;
    case NANOARROW_TYPE_TIMESTAMP:
      if (timezone == NULL) {
        timezone = "";
      }
      n_chars = snprintf(buffer, sizeof(buffer), "ts%s:%s", time_unit_str, timezone);
      break;
    case NANOARROW_TYPE_DURATION:
      if (timezone != NULL) {
        return EINVAL;
      }
      n_chars = snprintf(buffer, sizeof(buffer), "tD%s", time_unit_str);
      break;
    default:
      return EINVAL;
  }

  if (((size_t)n_chars) >= sizeof(buffer) || n_chars < 0) {
    return ERANGE;
  }

  buffer[n_chars] = '\0';

  return ArrowSchemaSetFormat(schema, buffer);
}

ArrowErrorCode ArrowSchemaSetTypeUnion(struct ArrowSchema* schema, enum ArrowType type,
                                       int64_t n_children) {
  if (n_children < 0 || n_children > 127) {
    return EINVAL;
  }

  // Max valid size would be +ud:0,1,...126 = 401 characters + null terminator
  char format_out[512];
  int64_t format_out_size = 512;
  memset(format_out, 0, format_out_size);
  int n_chars;
  char* format_cursor = format_out;

  switch (type) {
    case NANOARROW_TYPE_SPARSE_UNION:
      n_chars = snprintf(format_cursor, format_out_size, "+us:");
      format_cursor += n_chars;
      format_out_size -= n_chars;
      break;
    case NANOARROW_TYPE_DENSE_UNION:
      n_chars = snprintf(format_cursor, format_out_size, "+ud:");
      format_cursor += n_chars;
      format_out_size -= n_chars;
      break;
    default:
      return EINVAL;
  }

  // Ensure that an encoding error from snprintf() does not result
  // in an out-of-bounds access.
  if (n_chars < 0) {
    return ERANGE;
  }

  if (n_children > 0) {
    n_chars = snprintf(format_cursor, format_out_size, "0");
    format_cursor += n_chars;
    format_out_size -= n_chars;

    for (int64_t i = 1; i < n_children; i++) {
      n_chars = snprintf(format_cursor, format_out_size, ",%" PRId64, i);
      format_cursor += n_chars;
      format_out_size -= n_chars;
    }
  }

  // Ensure that an encoding error from snprintf() does not result
  // in an out-of-bounds access.
  if (n_chars < 0) {
    return ERANGE;
  }

  NANOARROW_RETURN_NOT_OK(ArrowSchemaSetFormat(schema, format_out));

  NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema, n_children));
  for (int64_t i = 0; i < n_children; i++) {
    ArrowSchemaInit(schema->children[i]);
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaSetFormat(struct ArrowSchema* schema, const char* format) {
  if (schema->format != NULL) {
    ArrowFree((void*)schema->format);
  }

  if (format != NULL) {
    size_t format_size = strlen(format) + 1;
    schema->format = (const char*)ArrowMalloc(format_size);
    if (schema->format == NULL) {
      return ENOMEM;
    }

    memcpy((void*)schema->format, format, format_size);
  } else {
    schema->format = NULL;
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaSetName(struct ArrowSchema* schema, const char* name) {
  if (schema->name != NULL) {
    ArrowFree((void*)schema->name);
  }

  if (name != NULL) {
    size_t name_size = strlen(name) + 1;
    schema->name = (const char*)ArrowMalloc(name_size);
    if (schema->name == NULL) {
      return ENOMEM;
    }

    memcpy((void*)schema->name, name, name_size);
  } else {
    schema->name = NULL;
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaSetMetadata(struct ArrowSchema* schema, const char* metadata) {
  if (schema->metadata != NULL) {
    ArrowFree((void*)schema->metadata);
  }

  if (metadata != NULL) {
    size_t metadata_size = ArrowMetadataSizeOf(metadata);
    schema->metadata = (const char*)ArrowMalloc(metadata_size);
    if (schema->metadata == NULL) {
      return ENOMEM;
    }

    memcpy((void*)schema->metadata, metadata, metadata_size);
  } else {
    schema->metadata = NULL;
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaAllocateChildren(struct ArrowSchema* schema,
                                           int64_t n_children) {
  if (schema->children != NULL) {
    return EEXIST;
  }

  if (n_children > 0) {
    schema->children =
        (struct ArrowSchema**)ArrowMalloc(n_children * sizeof(struct ArrowSchema*));

    if (schema->children == NULL) {
      return ENOMEM;
    }

    schema->n_children = n_children;

    memset(schema->children, 0, n_children * sizeof(struct ArrowSchema*));

    for (int64_t i = 0; i < n_children; i++) {
      schema->children[i] = (struct ArrowSchema*)ArrowMalloc(sizeof(struct ArrowSchema));

      if (schema->children[i] == NULL) {
        return ENOMEM;
      }

      schema->children[i]->release = NULL;
    }
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaAllocateDictionary(struct ArrowSchema* schema) {
  if (schema->dictionary != NULL) {
    return EEXIST;
  }

  schema->dictionary = (struct ArrowSchema*)ArrowMalloc(sizeof(struct ArrowSchema));
  if (schema->dictionary == NULL) {
    return ENOMEM;
  }

  schema->dictionary->release = NULL;
  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaDeepCopy(const struct ArrowSchema* schema,
                                   struct ArrowSchema* schema_out) {
  ArrowSchemaInit(schema_out);

  int result = ArrowSchemaSetFormat(schema_out, schema->format);
  if (result != NANOARROW_OK) {
    ArrowSchemaRelease(schema_out);
    return result;
  }

  schema_out->flags = schema->flags;

  result = ArrowSchemaSetName(schema_out, schema->name);
  if (result != NANOARROW_OK) {
    ArrowSchemaRelease(schema_out);
    return result;
  }

  result = ArrowSchemaSetMetadata(schema_out, schema->metadata);
  if (result != NANOARROW_OK) {
    ArrowSchemaRelease(schema_out);
    return result;
  }

  result = ArrowSchemaAllocateChildren(schema_out, schema->n_children);
  if (result != NANOARROW_OK) {
    ArrowSchemaRelease(schema_out);
    return result;
  }

  for (int64_t i = 0; i < schema->n_children; i++) {
    result = ArrowSchemaDeepCopy(schema->children[i], schema_out->children[i]);
    if (result != NANOARROW_OK) {
      ArrowSchemaRelease(schema_out);
      return result;
    }
  }

  if (schema->dictionary != NULL) {
    result = ArrowSchemaAllocateDictionary(schema_out);
    if (result != NANOARROW_OK) {
      ArrowSchemaRelease(schema_out);
      return result;
    }

    result = ArrowSchemaDeepCopy(schema->dictionary, schema_out->dictionary);
    if (result != NANOARROW_OK) {
      ArrowSchemaRelease(schema_out);
      return result;
    }
  }

  return NANOARROW_OK;
}

static void ArrowSchemaViewSetPrimitive(struct ArrowSchemaView* schema_view,
                                        enum ArrowType type) {
  schema_view->type = type;
  schema_view->storage_type = type;
}

static ArrowErrorCode ArrowSchemaViewParse(struct ArrowSchemaView* schema_view,
                                           const char* format,
                                           const char** format_end_out,
                                           struct ArrowError* error) {
  *format_end_out = format;

  // needed for decimal parsing
  const char* parse_start;
  char* parse_end;

  switch (format[0]) {
    case 'n':
      schema_view->type = NANOARROW_TYPE_NA;
      schema_view->storage_type = NANOARROW_TYPE_NA;
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'b':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_BOOL);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'c':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT8);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'C':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_UINT8);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 's':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT16);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'S':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_UINT16);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'i':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT32);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'I':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_UINT32);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'l':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'L':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_UINT64);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'e':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_HALF_FLOAT);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'f':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_FLOAT);
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'g':
      ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DOUBLE);
      *format_end_out = format + 1;
      return NANOARROW_OK;

    // decimal
    case 'd':
      if (format[1] != ':' || format[2] == '\0') {
        ArrowErrorSet(error, "Expected ':precision,scale[,bitwidth]' following 'd'");
        return EINVAL;
      }

      parse_start = format + 2;
      schema_view->decimal_precision = (int32_t)strtol(parse_start, &parse_end, 10);
      if (parse_end == parse_start || parse_end[0] != ',') {
        ArrowErrorSet(error, "Expected 'precision,scale[,bitwidth]' following 'd:'");
        return EINVAL;
      }

      parse_start = parse_end + 1;
      schema_view->decimal_scale = (int32_t)strtol(parse_start, &parse_end, 10);
      if (parse_end == parse_start) {
        ArrowErrorSet(error, "Expected 'scale[,bitwidth]' following 'd:precision,'");
        return EINVAL;
      } else if (parse_end[0] != ',') {
        schema_view->decimal_bitwidth = 128;
      } else {
        parse_start = parse_end + 1;
        schema_view->decimal_bitwidth = (int32_t)strtol(parse_start, &parse_end, 10);
        if (parse_start == parse_end) {
          ArrowErrorSet(error, "Expected precision following 'd:precision,scale,'");
          return EINVAL;
        }
      }

      *format_end_out = parse_end;

      switch (schema_view->decimal_bitwidth) {
        case 32:
          ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL32);
          return NANOARROW_OK;
        case 64:
          ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL64);
          return NANOARROW_OK;
        case 128:
          ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL128);
          return NANOARROW_OK;
        case 256:
          ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL256);
          return NANOARROW_OK;
        default:
          ArrowErrorSet(error,
                        "Expected decimal bitwidth of 128 or 256 but found %" PRId32,
                        schema_view->decimal_bitwidth);
          return EINVAL;
      }

    // validity + data
    case 'w':
      schema_view->type = NANOARROW_TYPE_FIXED_SIZE_BINARY;
      schema_view->storage_type = NANOARROW_TYPE_FIXED_SIZE_BINARY;
      if (format[1] != ':' || format[2] == '\0') {
        ArrowErrorSet(error, "Expected ':<width>' following 'w'");
        return EINVAL;
      }

      schema_view->fixed_size = (int32_t)strtol(format + 2, (char**)format_end_out, 10);
      return NANOARROW_OK;

    // validity + offset + data
    case 'z':
      schema_view->type = NANOARROW_TYPE_BINARY;
      schema_view->storage_type = NANOARROW_TYPE_BINARY;
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'u':
      schema_view->type = NANOARROW_TYPE_STRING;
      schema_view->storage_type = NANOARROW_TYPE_STRING;
      *format_end_out = format + 1;
      return NANOARROW_OK;

    // validity + large_offset + data
    case 'Z':
      schema_view->type = NANOARROW_TYPE_LARGE_BINARY;
      schema_view->storage_type = NANOARROW_TYPE_LARGE_BINARY;
      *format_end_out = format + 1;
      return NANOARROW_OK;
    case 'U':
      schema_view->type = NANOARROW_TYPE_LARGE_STRING;
      schema_view->storage_type = NANOARROW_TYPE_LARGE_STRING;
      *format_end_out = format + 1;
      return NANOARROW_OK;

    // nested types
    case '+':
      switch (format[1]) {
        // list has validity + offset or offset
        case 'l':
          schema_view->storage_type = NANOARROW_TYPE_LIST;
          schema_view->type = NANOARROW_TYPE_LIST;
          *format_end_out = format + 2;
          return NANOARROW_OK;

        // large list has validity + large_offset or large_offset
        case 'L':
          schema_view->storage_type = NANOARROW_TYPE_LARGE_LIST;
          schema_view->type = NANOARROW_TYPE_LARGE_LIST;
          *format_end_out = format + 2;
          return NANOARROW_OK;

        // run end encoded has no buffer at all
        case 'r':
          schema_view->storage_type = NANOARROW_TYPE_RUN_END_ENCODED;
          schema_view->type = NANOARROW_TYPE_RUN_END_ENCODED;
          *format_end_out = format + 2;
          return NANOARROW_OK;

        // just validity buffer
        case 'w':
          if (format[2] != ':' || format[3] == '\0') {
            ArrowErrorSet(error, "Expected ':<width>' following '+w'");
            return EINVAL;
          }

          schema_view->storage_type = NANOARROW_TYPE_FIXED_SIZE_LIST;
          schema_view->type = NANOARROW_TYPE_FIXED_SIZE_LIST;
          schema_view->fixed_size =
              (int32_t)strtol(format + 3, (char**)format_end_out, 10);
          return NANOARROW_OK;
        case 's':
          schema_view->storage_type = NANOARROW_TYPE_STRUCT;
          schema_view->type = NANOARROW_TYPE_STRUCT;
          *format_end_out = format + 2;
          return NANOARROW_OK;
        case 'm':
          schema_view->storage_type = NANOARROW_TYPE_MAP;
          schema_view->type = NANOARROW_TYPE_MAP;
          *format_end_out = format + 2;
          return NANOARROW_OK;

        // unions
        case 'u':
          switch (format[2]) {
            case 'd':
              schema_view->storage_type = NANOARROW_TYPE_DENSE_UNION;
              schema_view->type = NANOARROW_TYPE_DENSE_UNION;
              break;
            case 's':
              schema_view->storage_type = NANOARROW_TYPE_SPARSE_UNION;
              schema_view->type = NANOARROW_TYPE_SPARSE_UNION;
              break;
            default:
              ArrowErrorSet(error,
                            "Expected union format string +us:<type_ids> or "
                            "+ud:<type_ids> but found '%s'",
                            format);
              return EINVAL;
          }

          if (format[3] == ':') {
            schema_view->union_type_ids = format + 4;
            int64_t n_type_ids =
                _ArrowParseUnionTypeIds(schema_view->union_type_ids, NULL);
            if (n_type_ids != schema_view->schema->n_children) {
              ArrowErrorSet(error,
                            "Expected union type_ids parameter to be a comma-separated "
                            "list of %" PRId64 " values between 0 and 127 but found '%s'",
                            schema_view->schema->n_children, schema_view->union_type_ids);
              return EINVAL;
            }
            *format_end_out = format + strlen(format);
            return NANOARROW_OK;
          } else {
            ArrowErrorSet(error,
                          "Expected union format string +us:<type_ids> or +ud:<type_ids> "
                          "but found '%s'",
                          format);
            return EINVAL;
          }

        // views
        case 'v':
          switch (format[2]) {
            case 'l':
              schema_view->storage_type = NANOARROW_TYPE_LIST_VIEW;
              schema_view->type = NANOARROW_TYPE_LIST_VIEW;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'L':
              schema_view->storage_type = NANOARROW_TYPE_LARGE_LIST_VIEW;
              schema_view->type = NANOARROW_TYPE_LARGE_LIST_VIEW;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            default:
              ArrowErrorSet(
                  error, "Expected view format string +vl or +vL but found '%s'", format);
              return EINVAL;
          }
        default:
          ArrowErrorSet(error, "Expected nested type format string but found '%s'",
                        format);
          return EINVAL;
      }

    // date/time types
    case 't':
      switch (format[1]) {
        // date
        case 'd':
          switch (format[2]) {
            case 'D':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT32);
              schema_view->type = NANOARROW_TYPE_DATE32;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'm':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_DATE64;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            default:
              ArrowErrorSet(error, "Expected 'D' or 'm' following 'td' but found '%s'",
                            format + 2);
              return EINVAL;
          }

        // time of day
        case 't':
          switch (format[2]) {
            case 's':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT32);
              schema_view->type = NANOARROW_TYPE_TIME32;
              schema_view->time_unit = NANOARROW_TIME_UNIT_SECOND;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'm':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT32);
              schema_view->type = NANOARROW_TYPE_TIME32;
              schema_view->time_unit = NANOARROW_TIME_UNIT_MILLI;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'u':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_TIME64;
              schema_view->time_unit = NANOARROW_TIME_UNIT_MICRO;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'n':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_TIME64;
              schema_view->time_unit = NANOARROW_TIME_UNIT_NANO;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            default:
              ArrowErrorSet(
                  error, "Expected 's', 'm', 'u', or 'n' following 'tt' but found '%s'",
                  format + 2);
              return EINVAL;
          }

        // timestamp
        case 's':
          switch (format[2]) {
            case 's':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_TIMESTAMP;
              schema_view->time_unit = NANOARROW_TIME_UNIT_SECOND;
              break;
            case 'm':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_TIMESTAMP;
              schema_view->time_unit = NANOARROW_TIME_UNIT_MILLI;
              break;
            case 'u':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_TIMESTAMP;
              schema_view->time_unit = NANOARROW_TIME_UNIT_MICRO;
              break;
            case 'n':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_TIMESTAMP;
              schema_view->time_unit = NANOARROW_TIME_UNIT_NANO;
              break;
            default:
              ArrowErrorSet(
                  error, "Expected 's', 'm', 'u', or 'n' following 'ts' but found '%s'",
                  format + 2);
              return EINVAL;
          }

          if (format[3] != ':') {
            ArrowErrorSet(error, "Expected ':' following '%.3s' but found '%s'", format,
                          format + 3);
            return EINVAL;
          }

          schema_view->timezone = format + 4;
          *format_end_out = format + strlen(format);
          return NANOARROW_OK;

        // duration
        case 'D':
          switch (format[2]) {
            case 's':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_DURATION;
              schema_view->time_unit = NANOARROW_TIME_UNIT_SECOND;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'm':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_DURATION;
              schema_view->time_unit = NANOARROW_TIME_UNIT_MILLI;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'u':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_DURATION;
              schema_view->time_unit = NANOARROW_TIME_UNIT_MICRO;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'n':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INT64);
              schema_view->type = NANOARROW_TYPE_DURATION;
              schema_view->time_unit = NANOARROW_TIME_UNIT_NANO;
              *format_end_out = format + 3;
              return NANOARROW_OK;
            default:
              ArrowErrorSet(error,
                            "Expected 's', 'm', u', or 'n' following 'tD' but found '%s'",
                            format + 2);
              return EINVAL;
          }

        // interval
        case 'i':
          switch (format[2]) {
            case 'M':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INTERVAL_MONTHS);
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'D':
              ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_INTERVAL_DAY_TIME);
              *format_end_out = format + 3;
              return NANOARROW_OK;
            case 'n':
              ArrowSchemaViewSetPrimitive(schema_view,
                                          NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO);
              *format_end_out = format + 3;
              return NANOARROW_OK;
            default:
              ArrowErrorSet(error,
                            "Expected 'M', 'D', or 'n' following 'ti' but found '%s'",
                            format + 2);
              return EINVAL;
          }

        default:
          ArrowErrorSet(
              error, "Expected 'd', 't', 's', 'D', or 'i' following 't' but found '%s'",
              format + 1);
          return EINVAL;
      }

    // view types
    case 'v': {
      switch (format[1]) {
        case 'u':
          ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_STRING_VIEW);
          *format_end_out = format + 2;
          return NANOARROW_OK;
        case 'z':
          ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_BINARY_VIEW);
          *format_end_out = format + 2;
          return NANOARROW_OK;
        default:
          ArrowErrorSet(error, "Expected 'u', or 'z' following 'v' but found '%s'",
                        format + 1);
          return EINVAL;
      }
    }

    default:
      ArrowErrorSet(error, "Unknown format: '%s'", format);
      return EINVAL;
  }
}

static ArrowErrorCode ArrowSchemaViewValidateNChildren(
    struct ArrowSchemaView* schema_view, int64_t n_children, struct ArrowError* error) {
  if (n_children != -1 && schema_view->schema->n_children != n_children) {
    ArrowErrorSet(
        error, "Expected schema with %" PRId64 " children but found %" PRId64 " children",
        n_children, schema_view->schema->n_children);
    return EINVAL;
  }

  // Don't do a full validation of children but do check that they won't
  // segfault if inspected
  struct ArrowSchema* child;
  for (int64_t i = 0; i < schema_view->schema->n_children; i++) {
    child = schema_view->schema->children[i];
    if (child == NULL) {
      ArrowErrorSet(
          error, "Expected valid schema at schema->children[%" PRId64 "] but found NULL",
          i);
      return EINVAL;
    } else if (child->release == NULL) {
      ArrowErrorSet(error,
                    "Expected valid schema at schema->children[%" PRId64
                    "] but found a released schema",
                    i);
      return EINVAL;
    }
  }

  return NANOARROW_OK;
}

static ArrowErrorCode ArrowSchemaViewValidateUnion(struct ArrowSchemaView* schema_view,
                                                   struct ArrowError* error) {
  return ArrowSchemaViewValidateNChildren(schema_view, -1, error);
}

static ArrowErrorCode ArrowSchemaViewValidateMap(struct ArrowSchemaView* schema_view,
                                                 struct ArrowError* error) {
  NANOARROW_RETURN_NOT_OK(ArrowSchemaViewValidateNChildren(schema_view, 1, error));

  if (schema_view->schema->children[0]->n_children != 2) {
    ArrowErrorSet(error,
                  "Expected child of map type to have 2 children but found %" PRId64,
                  schema_view->schema->children[0]->n_children);
    return EINVAL;
  }

  if (strcmp(schema_view->schema->children[0]->format, "+s") != 0) {
    ArrowErrorSet(error, "Expected format of child of map type to be '+s' but found '%s'",
                  schema_view->schema->children[0]->format);
    return EINVAL;
  }

  if (schema_view->schema->children[0]->flags & ARROW_FLAG_NULLABLE) {
    ArrowErrorSet(error,
                  "Expected child of map type to be non-nullable but was nullable");
    return EINVAL;
  }

  if (schema_view->schema->children[0]->children[0]->flags & ARROW_FLAG_NULLABLE) {
    ArrowErrorSet(error, "Expected key of map type to be non-nullable but was nullable");
    return EINVAL;
  }

  return NANOARROW_OK;
}

static ArrowErrorCode ArrowSchemaViewValidateDictionary(
    struct ArrowSchemaView* schema_view, struct ArrowError* error) {
  // check for valid index type
  switch (schema_view->storage_type) {
    case NANOARROW_TYPE_UINT8:
    case NANOARROW_TYPE_INT8:
    case NANOARROW_TYPE_UINT16:
    case NANOARROW_TYPE_INT16:
    case NANOARROW_TYPE_UINT32:
    case NANOARROW_TYPE_INT32:
    case NANOARROW_TYPE_UINT64:
    case NANOARROW_TYPE_INT64:
      break;
    default:
      ArrowErrorSet(
          error,
          "Expected dictionary schema index type to be an integral type but found '%s'",
          schema_view->schema->format);
      return EINVAL;
  }

  struct ArrowSchemaView dictionary_schema_view;
  return ArrowSchemaViewInit(&dictionary_schema_view, schema_view->schema->dictionary,
                             error);
}

static ArrowErrorCode ArrowSchemaViewValidate(struct ArrowSchemaView* schema_view,
                                              enum ArrowType type,
                                              struct ArrowError* error) {
  switch (type) {
    case NANOARROW_TYPE_NA:
    case NANOARROW_TYPE_BOOL:
    case NANOARROW_TYPE_UINT8:
    case NANOARROW_TYPE_INT8:
    case NANOARROW_TYPE_UINT16:
    case NANOARROW_TYPE_INT16:
    case NANOARROW_TYPE_UINT32:
    case NANOARROW_TYPE_INT32:
    case NANOARROW_TYPE_UINT64:
    case NANOARROW_TYPE_INT64:
    case NANOARROW_TYPE_HALF_FLOAT:
    case NANOARROW_TYPE_FLOAT:
    case NANOARROW_TYPE_DOUBLE:
    case NANOARROW_TYPE_DECIMAL32:
    case NANOARROW_TYPE_DECIMAL64:
    case NANOARROW_TYPE_DECIMAL128:
    case NANOARROW_TYPE_DECIMAL256:
    case NANOARROW_TYPE_STRING:
    case NANOARROW_TYPE_LARGE_STRING:
    case NANOARROW_TYPE_BINARY:
    case NANOARROW_TYPE_LARGE_BINARY:
    case NANOARROW_TYPE_DATE32:
    case NANOARROW_TYPE_DATE64:
    case NANOARROW_TYPE_INTERVAL_MONTHS:
    case NANOARROW_TYPE_INTERVAL_DAY_TIME:
    case NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO:
    case NANOARROW_TYPE_TIMESTAMP:
    case NANOARROW_TYPE_TIME32:
    case NANOARROW_TYPE_TIME64:
    case NANOARROW_TYPE_DURATION:
    case NANOARROW_TYPE_BINARY_VIEW:
    case NANOARROW_TYPE_STRING_VIEW:
      return ArrowSchemaViewValidateNChildren(schema_view, 0, error);

    case NANOARROW_TYPE_FIXED_SIZE_BINARY:
      if (schema_view->fixed_size <= 0) {
        ArrowErrorSet(error, "Expected size > 0 for fixed size binary but found size %d",
                      schema_view->fixed_size);
        return EINVAL;
      }
      return ArrowSchemaViewValidateNChildren(schema_view, 0, error);

    case NANOARROW_TYPE_LIST:
    case NANOARROW_TYPE_LIST_VIEW:
    case NANOARROW_TYPE_LARGE_LIST:
    case NANOARROW_TYPE_LARGE_LIST_VIEW:
    case NANOARROW_TYPE_FIXED_SIZE_LIST:
      return ArrowSchemaViewValidateNChildren(schema_view, 1, error);

    case NANOARROW_TYPE_RUN_END_ENCODED:
      return ArrowSchemaViewValidateNChildren(schema_view, 2, error);

    case NANOARROW_TYPE_STRUCT:
      return ArrowSchemaViewValidateNChildren(schema_view, -1, error);

    case NANOARROW_TYPE_SPARSE_UNION:
    case NANOARROW_TYPE_DENSE_UNION:
      return ArrowSchemaViewValidateUnion(schema_view, error);

    case NANOARROW_TYPE_MAP:
      return ArrowSchemaViewValidateMap(schema_view, error);

    case NANOARROW_TYPE_DICTIONARY:
      return ArrowSchemaViewValidateDictionary(schema_view, error);

    default:
      ArrowErrorSet(error, "Expected a valid enum ArrowType value but found %d",
                    schema_view->type);
      return EINVAL;
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowSchemaViewInit(struct ArrowSchemaView* schema_view,
                                   const struct ArrowSchema* schema,
                                   struct ArrowError* error) {
  if (schema == NULL) {
    ArrowErrorSet(error, "Expected non-NULL schema");
    return EINVAL;
  }

  if (schema->release == NULL) {
    ArrowErrorSet(error, "Expected non-released schema");
    return EINVAL;
  }

  schema_view->schema = schema;

  const char* format = schema->format;
  if (format == NULL) {
    ArrowErrorSet(
        error,
        "Error parsing schema->format: Expected a null-terminated string but found NULL");
    return EINVAL;
  }

  size_t format_len = strlen(format);
  if (format_len == 0) {
    ArrowErrorSet(error, "Error parsing schema->format: Expected a string with size > 0");
    return EINVAL;
  }

  const char* format_end_out;
  int result = ArrowSchemaViewParse(schema_view, format, &format_end_out, error);

  if (result != NANOARROW_OK) {
    if (error != NULL) {
      char child_error[1024];
      memcpy(child_error, ArrowErrorMessage(error), 1024);
      ArrowErrorSet(error, "Error parsing schema->format: %s", child_error);
    }

    return result;
  }

  if ((format + format_len) != format_end_out) {
    ArrowErrorSet(error, "Error parsing schema->format '%s': parsed %d/%zu characters",
                  format, (int)(format_end_out - format), format_len);
    return EINVAL;
  }

  if (schema->dictionary != NULL) {
    schema_view->type = NANOARROW_TYPE_DICTIONARY;
  }

  NANOARROW_RETURN_NOT_OK(
      ArrowSchemaViewValidate(schema_view, schema_view->storage_type, error));

  if (schema_view->storage_type != schema_view->type) {
    NANOARROW_RETURN_NOT_OK(
        ArrowSchemaViewValidate(schema_view, schema_view->type, error));
  }

  int64_t unknown_flags = schema->flags & ~NANOARROW_FLAG_ALL_SUPPORTED;
  if (unknown_flags != 0) {
    ArrowErrorSet(error, "Unknown ArrowSchema flag");
    return EINVAL;
  }

  if (schema->flags & ARROW_FLAG_DICTIONARY_ORDERED &&
      schema_view->type != NANOARROW_TYPE_DICTIONARY) {
    ArrowErrorSet(error,
                  "ARROW_FLAG_DICTIONARY_ORDERED is only relevant for dictionaries");
    return EINVAL;
  }

  if (schema->flags & ARROW_FLAG_MAP_KEYS_SORTED &&
      schema_view->type != NANOARROW_TYPE_MAP) {
    ArrowErrorSet(error, "ARROW_FLAG_MAP_KEYS_SORTED is only relevant for a map type");
    return EINVAL;
  }

  ArrowLayoutInit(&schema_view->layout, schema_view->storage_type);
  if (schema_view->storage_type == NANOARROW_TYPE_FIXED_SIZE_BINARY) {
    schema_view->layout.element_size_bits[1] = (int64_t)schema_view->fixed_size * 8;
  } else if (schema_view->storage_type == NANOARROW_TYPE_FIXED_SIZE_LIST) {
    schema_view->layout.child_size_elements = schema_view->fixed_size;
  }

  schema_view->extension_name = ArrowCharView(NULL);
  schema_view->extension_metadata = ArrowCharView(NULL);
  NANOARROW_RETURN_NOT_OK(ArrowMetadataGetValue(schema->metadata,
                                                ArrowCharView("ARROW:extension:name"),
                                                &schema_view->extension_name));
  NANOARROW_RETURN_NOT_OK(ArrowMetadataGetValue(schema->metadata,
                                                ArrowCharView("ARROW:extension:metadata"),
                                                &schema_view->extension_metadata));

  return NANOARROW_OK;
}

static int64_t ArrowSchemaTypeToStringInternal(struct ArrowSchemaView* schema_view,
                                               char* out, int64_t n) {
  const char* type_string = ArrowTypeString(schema_view->type);
  switch (schema_view->type) {
    case NANOARROW_TYPE_DECIMAL32:
    case NANOARROW_TYPE_DECIMAL64:
    case NANOARROW_TYPE_DECIMAL128:
    case NANOARROW_TYPE_DECIMAL256:
      return snprintf(out, n, "%s(%" PRId32 ", %" PRId32 ")", type_string,
                      schema_view->decimal_precision, schema_view->decimal_scale);
    case NANOARROW_TYPE_TIMESTAMP:
      return snprintf(out, n, "%s('%s', '%s')", type_string,
                      ArrowTimeUnitString(schema_view->time_unit), schema_view->timezone);
    case NANOARROW_TYPE_TIME32:
    case NANOARROW_TYPE_TIME64:
    case NANOARROW_TYPE_DURATION:
      return snprintf(out, n, "%s('%s')", type_string,
                      ArrowTimeUnitString(schema_view->time_unit));
    case NANOARROW_TYPE_FIXED_SIZE_BINARY:
    case NANOARROW_TYPE_FIXED_SIZE_LIST:
      return snprintf(out, n, "%s(%" PRId32 ")", type_string, schema_view->fixed_size);
    case NANOARROW_TYPE_SPARSE_UNION:
    case NANOARROW_TYPE_DENSE_UNION:
      return snprintf(out, n, "%s([%s])", type_string, schema_view->union_type_ids);
    default:
      return snprintf(out, n, "%s", type_string);
  }
}

// Helper for bookkeeping to emulate sprintf()-like behaviour spread
// among multiple sprintf calls.
static inline void ArrowToStringLogChars(char** out, int64_t n_chars_last,
                                         int64_t* n_remaining, int64_t* n_chars) {
  // In the unlikely snprintf() returning a negative value (encoding error),
  // ensure the result won't cause an out-of-bounds access.
  if (n_chars_last < 0) {
    n_chars_last = 0;
  }

  *n_chars += n_chars_last;
  *n_remaining -= n_chars_last;

  // n_remaining is never less than 0
  if (*n_remaining < 0) {
    *n_remaining = 0;
  }

  // Can't do math on a NULL pointer
  if (*out != NULL) {
    *out += n_chars_last;
  }
}

int64_t ArrowSchemaToString(const struct ArrowSchema* schema, char* out, int64_t n,
                            char recursive) {
  if (schema == NULL) {
    return snprintf(out, n, "[invalid: pointer is null]");
  }

  if (schema->release == NULL) {
    return snprintf(out, n, "[invalid: schema is released]");
  }

  struct ArrowSchemaView schema_view;
  struct ArrowError error;

  if (ArrowSchemaViewInit(&schema_view, schema, &error) != NANOARROW_OK) {
    return snprintf(out, n, "[invalid: %s]", ArrowErrorMessage(&error));
  }

  // Extension type and dictionary should include both the top-level type
  // and the storage type.
  int is_extension = schema_view.extension_name.size_bytes > 0;
  int is_dictionary = schema->dictionary != NULL;
  int64_t n_chars = 0;
  int64_t n_chars_last = 0;

  // Uncommon but not technically impossible that both are true
  if (is_extension && is_dictionary) {
    n_chars_last = snprintf(
        out, n, "%.*s{dictionary(%s)<", (int)schema_view.extension_name.size_bytes,
        schema_view.extension_name.data, ArrowTypeString(schema_view.storage_type));
  } else if (is_extension) {
    n_chars_last = snprintf(out, n, "%.*s{", (int)schema_view.extension_name.size_bytes,
                            schema_view.extension_name.data);
  } else if (is_dictionary) {
    n_chars_last =
        snprintf(out, n, "dictionary(%s)<", ArrowTypeString(schema_view.storage_type));
  }

  ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);

  if (!is_dictionary) {
    n_chars_last = ArrowSchemaTypeToStringInternal(&schema_view, out, n);
  } else {
    n_chars_last = ArrowSchemaToString(schema->dictionary, out, n, recursive);
  }

  ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);

  if (recursive && schema->format[0] == '+') {
    n_chars_last = snprintf(out, n, "<");
    ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);

    for (int64_t i = 0; i < schema->n_children; i++) {
      if (i > 0) {
        n_chars_last = snprintf(out, n, ", ");
        ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);
      }

      // ArrowSchemaToStringInternal() will validate the child and print the error,
      // but we need the name first
      if (schema->children[i] != NULL && schema->children[i]->release != NULL &&
          schema->children[i]->name != NULL) {
        n_chars_last = snprintf(out, n, "%s: ", schema->children[i]->name);
        ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);
      }

      n_chars_last = ArrowSchemaToString(schema->children[i], out, n, recursive);
      ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);
    }

    n_chars_last = snprintf(out, n, ">");
    ArrowToStringLogChars(&out, n_chars_last, &n, &n_chars);
  }

  if (is_extension && is_dictionary) {
    n_chars += snprintf(out, n, ">}");
  } else if (is_extension) {
    n_chars += snprintf(out, n, "}");
  } else if (is_dictionary) {
    n_chars += snprintf(out, n, ">");
  }

  // Ensure that we always return a positive result
  if (n_chars > 0) {
    return n_chars;
  } else {
    return 0;
  }
}

ArrowErrorCode ArrowMetadataReaderInit(struct ArrowMetadataReader* reader,
                                       const char* metadata) {
  reader->metadata = metadata;

  if (reader->metadata == NULL) {
    reader->offset = 0;
    reader->remaining_keys = 0;
  } else {
    memcpy(&reader->remaining_keys, reader->metadata, sizeof(int32_t));
    reader->offset = sizeof(int32_t);
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowMetadataReaderRead(struct ArrowMetadataReader* reader,
                                       struct ArrowStringView* key_out,
                                       struct ArrowStringView* value_out) {
  if (reader->remaining_keys <= 0) {
    return EINVAL;
  }

  int64_t pos = 0;

  int32_t key_size;
  memcpy(&key_size, reader->metadata + reader->offset + pos, sizeof(int32_t));
  pos += sizeof(int32_t);

  key_out->data = reader->metadata + reader->offset + pos;
  key_out->size_bytes = key_size;
  pos += key_size;

  int32_t value_size;
  memcpy(&value_size, reader->metadata + reader->offset + pos, sizeof(int32_t));
  pos += sizeof(int32_t);

  value_out->data = reader->metadata + reader->offset + pos;
  value_out->size_bytes = value_size;
  pos += value_size;

  reader->offset += pos;
  reader->remaining_keys--;
  return NANOARROW_OK;
}

int64_t ArrowMetadataSizeOf(const char* metadata) {
  if (metadata == NULL) {
    return 0;
  }

  struct ArrowMetadataReader reader;
  struct ArrowStringView key;
  struct ArrowStringView value;
  if (ArrowMetadataReaderInit(&reader, metadata) != NANOARROW_OK) {
    return 0;
  }

  int64_t size = sizeof(int32_t);
  while (ArrowMetadataReaderRead(&reader, &key, &value) == NANOARROW_OK) {
    size += sizeof(int32_t) + key.size_bytes + sizeof(int32_t) + value.size_bytes;
  }

  return size;
}

static ArrowErrorCode ArrowMetadataGetValueInternal(const char* metadata,
                                                    struct ArrowStringView* key,
                                                    struct ArrowStringView* value_out) {
  struct ArrowMetadataReader reader;
  struct ArrowStringView existing_key;
  struct ArrowStringView existing_value;
  NANOARROW_RETURN_NOT_OK(ArrowMetadataReaderInit(&reader, metadata));

  while (ArrowMetadataReaderRead(&reader, &existing_key, &existing_value) ==
         NANOARROW_OK) {
    int key_equal = key->size_bytes == existing_key.size_bytes &&
                    strncmp(key->data, existing_key.data, existing_key.size_bytes) == 0;
    if (key_equal) {
      value_out->data = existing_value.data;
      value_out->size_bytes = existing_value.size_bytes;
      break;
    }
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowMetadataGetValue(const char* metadata, struct ArrowStringView key,
                                     struct ArrowStringView* value_out) {
  if (value_out == NULL) {
    return EINVAL;
  }

  return ArrowMetadataGetValueInternal(metadata, &key, value_out);
}

char ArrowMetadataHasKey(const char* metadata, struct ArrowStringView key) {
  struct ArrowStringView value = ArrowCharView(NULL);
  if (ArrowMetadataGetValue(metadata, key, &value) != NANOARROW_OK) {
    return 0;
  }

  return value.data != NULL;
}

ArrowErrorCode ArrowMetadataBuilderInit(struct ArrowBuffer* buffer,
                                        const char* metadata) {
  ArrowBufferInit(buffer);
  return ArrowBufferAppend(buffer, metadata, ArrowMetadataSizeOf(metadata));
}

static ArrowErrorCode ArrowMetadataBuilderAppendInternal(struct ArrowBuffer* buffer,
                                                         struct ArrowStringView* key,
                                                         struct ArrowStringView* value) {
  if (value == NULL) {
    return NANOARROW_OK;
  }

  if (buffer->capacity_bytes == 0) {
    NANOARROW_RETURN_NOT_OK(ArrowBufferAppendInt32(buffer, 0));
  }

  if (((size_t)buffer->capacity_bytes) < sizeof(int32_t)) {
    return EINVAL;
  }

  int32_t n_keys;
  memcpy(&n_keys, buffer->data, sizeof(int32_t));

  int32_t key_size = (int32_t)key->size_bytes;
  int32_t value_size = (int32_t)value->size_bytes;
  NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(
      buffer, sizeof(int32_t) + key_size + sizeof(int32_t) + value_size));

  ArrowBufferAppendUnsafe(buffer, &key_size, sizeof(int32_t));
  ArrowBufferAppendUnsafe(buffer, key->data, key_size);
  ArrowBufferAppendUnsafe(buffer, &value_size, sizeof(int32_t));
  ArrowBufferAppendUnsafe(buffer, value->data, value_size);

  n_keys++;
  memcpy(buffer->data, &n_keys, sizeof(int32_t));

  return NANOARROW_OK;
}

static ArrowErrorCode ArrowMetadataBuilderSetInternal(struct ArrowBuffer* buffer,
                                                      struct ArrowStringView* key,
                                                      struct ArrowStringView* value) {
  // Inspect the current value to see if we can avoid copying the buffer
  struct ArrowStringView current_value = ArrowCharView(NULL);
  NANOARROW_RETURN_NOT_OK(
      ArrowMetadataGetValueInternal((const char*)buffer->data, key, &current_value));

  // The key should be removed but no key exists
  if (value == NULL && current_value.data == NULL) {
    return NANOARROW_OK;
  }

  // The key/value can be appended because no key exists
  if (value != NULL && current_value.data == NULL) {
    return ArrowMetadataBuilderAppendInternal(buffer, key, value);
  }

  struct ArrowMetadataReader reader;
  struct ArrowStringView existing_key;
  struct ArrowStringView existing_value;
  NANOARROW_RETURN_NOT_OK(ArrowMetadataReaderInit(&reader, (const char*)buffer->data));

  struct ArrowBuffer new_buffer;
  NANOARROW_RETURN_NOT_OK(ArrowMetadataBuilderInit(&new_buffer, NULL));

  while (reader.remaining_keys > 0) {
    int result = ArrowMetadataReaderRead(&reader, &existing_key, &existing_value);
    if (result != NANOARROW_OK) {
      ArrowBufferReset(&new_buffer);
      return result;
    }

    if (key->size_byte
Download .txt
gitextract_3x8i50ut/

├── .dockerignore
├── .github/
│   └── workflows/
│       ├── release.yml
│       └── test.yml
├── .gitignore
├── ChangeLog.md
├── LICENSE
├── README.md
├── bench/
│   ├── Bench.hs
│   └── test-data/
│       ├── complex-types.loc
│       ├── interop.loc
│       └── simple.loc
├── container/
│   ├── Makefile
│   ├── full/
│   │   ├── Dockerfile
│   │   └── assets/
│   │       ├── README
│   │       ├── bashrc
│   │       └── vimrc
│   ├── static-build/
│   │   ├── Dockerfile
│   │   └── build.sh
│   ├── test/
│   │   ├── Dockerfile
│   │   └── assets/
│   │       └── bashrc
│   └── tiny/
│       └── Dockerfile
├── data/
│   ├── lang/
│   │   ├── c/
│   │   │   └── lang.yaml
│   │   ├── cpp/
│   │   │   ├── cppmorloc.cpp
│   │   │   ├── cppmorloc.hpp
│   │   │   ├── init.sh
│   │   │   ├── lang.yaml
│   │   │   ├── mlc_arrow.hpp
│   │   │   ├── mlc_tensor.hpp
│   │   │   ├── morloc_pch.hpp
│   │   │   ├── nanoarrow/
│   │   │   │   ├── nanoarrow.c
│   │   │   │   └── nanoarrow.h
│   │   │   └── pool.cpp
│   │   ├── julia/
│   │   │   ├── MorlocRuntime.jl
│   │   │   ├── init.sh
│   │   │   ├── juliabridge.c
│   │   │   ├── lang.yaml
│   │   │   └── pool.jl
│   │   ├── languages.yaml
│   │   ├── py/
│   │   │   ├── Makefile
│   │   │   ├── init.sh
│   │   │   ├── lang.yaml
│   │   │   ├── pool.py
│   │   │   ├── pymorloc.c
│   │   │   └── setup.py
│   │   └── r/
│   │       ├── init.sh
│   │       ├── lang.yaml
│   │       ├── pool.R
│   │       └── rmorloc.c
│   ├── misc/
│   │   └── mlccpptypes.hpp
│   ├── morloc/
│   │   └── morloc.h
│   └── rust/
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── morloc-manager/
│       │   ├── Cargo.toml
│       │   └── src/
│       │       ├── config.rs
│       │       ├── container.rs
│       │       ├── doctor.rs
│       │       ├── environment.rs
│       │       ├── error.rs
│       │       ├── freeze.rs
│       │       ├── main.rs
│       │       ├── selinux.rs
│       │       ├── serve.rs
│       │       └── types.rs
│       ├── morloc-manifest/
│       │   ├── Cargo.toml
│       │   └── src/
│       │       └── lib.rs
│       ├── morloc-nexus/
│       │   ├── Cargo.toml
│       │   ├── build.rs
│       │   └── src/
│       │       ├── dispatch.rs
│       │       ├── help.rs
│       │       ├── main.rs
│       │       ├── manifest.rs
│       │       └── process.rs
│       └── morloc-runtime/
│           ├── Cargo.toml
│           ├── build.rs
│           ├── cbindgen.toml
│           └── src/
│               ├── arrow_ffi.rs
│               ├── cache.rs
│               ├── cli.rs
│               ├── cschema.rs
│               ├── daemon_ffi.rs
│               ├── error.rs
│               ├── eval_ffi.rs
│               ├── ffi.rs
│               ├── hash.rs
│               ├── http_ffi.rs
│               ├── intrinsics.rs
│               ├── ipc.rs
│               ├── ipc_ffi.rs
│               ├── json.rs
│               ├── json_ffi.rs
│               ├── lib.rs
│               ├── manifest_ffi.rs
│               ├── mpack.rs
│               ├── packet.rs
│               ├── packet_ffi.rs
│               ├── pool_ffi.rs
│               ├── router_ffi.rs
│               ├── schema.rs
│               ├── shm.rs
│               ├── slurm_ffi.rs
│               ├── utility.rs
│               └── voidstar.rs
├── exe/
│   └── morloc-codegen-generic/
│       └── Main.hs
├── executable/
│   ├── CppPrinter.hs
│   ├── CppTranslator.hs
│   ├── Main.hs
│   ├── Subcommands.hs
│   └── UI.hs
├── fourmolu.yaml
├── hie.yaml
├── library/
│   ├── Morloc/
│   │   ├── BaseTypes.hs
│   │   ├── CodeGenerator/
│   │   │   ├── Docstrings.hs
│   │   │   ├── Emit.hs
│   │   │   ├── Express.hs
│   │   │   ├── Grammars/
│   │   │   │   ├── Common.hs
│   │   │   │   ├── Macro.hs
│   │   │   │   └── Translator/
│   │   │   │       ├── Generic.hs
│   │   │   │       ├── Imperative.hs
│   │   │   │       └── PseudoCode.hs
│   │   │   ├── Infer.hs
│   │   │   ├── LambdaEval.hs
│   │   │   ├── LanguageDescriptor.hs
│   │   │   ├── Namespace.hs
│   │   │   ├── Nexus.hs
│   │   │   ├── Parameterize.hs
│   │   │   ├── Realize.hs
│   │   │   ├── Reduce.hs
│   │   │   ├── Segment.hs
│   │   │   ├── Serial.hs
│   │   │   ├── Serialize.hs
│   │   │   └── SystemConfig.hs
│   │   ├── Completion.hs
│   │   ├── Config.hs
│   │   ├── Data/
│   │   │   ├── Annotated.hs
│   │   │   ├── Bifoldable.hs
│   │   │   ├── Bifunctor.hs
│   │   │   ├── DAG.hs
│   │   │   ├── Doc.hs
│   │   │   ├── GMap.hs
│   │   │   ├── Json.hs
│   │   │   ├── Map/
│   │   │   │   └── Extra.hs
│   │   │   ├── Map.hs
│   │   │   └── Text.hs
│   │   ├── DataFiles.hs
│   │   ├── Frontend/
│   │   │   ├── API.hs
│   │   │   ├── AST.hs
│   │   │   ├── CST.hs
│   │   │   ├── Desugar.hs
│   │   │   ├── Lexer.hs
│   │   │   ├── Link.hs
│   │   │   ├── Merge.hs
│   │   │   ├── Namespace.hs
│   │   │   ├── Parser.hs
│   │   │   ├── Parser.y
│   │   │   ├── Restructure.hs
│   │   │   ├── Token.hs
│   │   │   ├── Treeify.hs
│   │   │   ├── Typecheck.hs
│   │   │   └── Valuecheck.hs
│   │   ├── Internal.hs
│   │   ├── LangRegistry.hs
│   │   ├── Language.hs
│   │   ├── Module.hs
│   │   ├── Monad.hs
│   │   ├── Namespace/
│   │   │   ├── Expr.hs
│   │   │   ├── Prim.hs
│   │   │   ├── State.hs
│   │   │   └── Type.hs
│   │   ├── ProgramBuilder/
│   │   │   ├── Build.hs
│   │   │   └── Install.hs
│   │   ├── Quasi.hs
│   │   ├── System.hs
│   │   ├── TypeEval.hs
│   │   ├── Typecheck/
│   │   │   ├── Internal.hs
│   │   │   └── NatSolver.hs
│   │   └── Version.hs
│   └── Morloc.hs
├── metrics/
│   ├── README.md
│   └── scripts/
│       ├── collect-metrics.sh
│       └── compare-metrics.sh
├── package.yaml
├── scripts/
│   ├── build-rust.sh
│   └── bump-version.sh
├── spec/
│   ├── SPEC.md
│   ├── compiler/
│   │   ├── COMPILER.md
│   │   ├── build.md
│   │   ├── codegen.md
│   │   ├── parsing.md
│   │   ├── pipeline.md
│   │   └── typechecking.md
│   ├── interop/
│   │   ├── INTEROP.md
│   │   ├── foreign-functions.md
│   │   ├── implementation-selection.md
│   │   ├── serialization.md
│   │   └── type-mappings.md
│   ├── language/
│   │   ├── LANGUAGE.md
│   │   ├── annotations.md
│   │   ├── declarations.md
│   │   ├── expressions.md
│   │   ├── lexical-structure.md
│   │   └── operators.md
│   ├── modules/
│   │   ├── MODULES.md
│   │   ├── imports-and-exports.md
│   │   ├── packages.md
│   │   └── resolution.md
│   ├── runtime/
│   │   ├── RUNTIME.md
│   │   ├── cli.md
│   │   ├── execution-model.md
│   │   ├── ipc.md
│   │   └── manifest.md
│   └── types/
│       ├── TYPES.md
│       ├── inference.md
│       ├── polymorphism.md
│       ├── primitive-types.md
│       ├── records.md
│       ├── subtyping.md
│       ├── type-declarations.md
│       └── typeclasses.md
├── stack.yaml
└── test-suite/
    ├── .gitignore
    ├── GoldenMakefileTests.hs
    ├── Main.hs
    ├── PropertyTests.hs
    ├── UnitTypeTests.hs
    ├── cmorloc-tests/
    │   ├── Makefile
    │   ├── test.c
    │   └── test.h
    ├── concurrency-tests/
    │   ├── bidi-py-r.loc
    │   ├── bidi-r-py.loc
    │   ├── concurrent-uni.loc
    │   ├── deep-callback.loc
    │   ├── helpers/
    │   │   ├── py_funcs.py
    │   │   └── r_funcs.R
    │   └── run-tests.sh
    ├── daemon-tests/
    │   ├── arithmetic.loc
    │   ├── helpers.py
    │   ├── pure.loc
    │   ├── run-tests.sh
    │   └── strings.loc
    ├── error-message-tests/
    │   ├── README
    │   ├── bad-source/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── cyclical-import/
    │   │   └── foo.loc
    │   ├── list-error-1/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── missing-import-module/
    │   │   └── foo.loc
    │   ├── missing-import-term/
    │   │   ├── barm.loc
    │   │   └── main.loc
    │   ├── pool-crash-cpp/
    │   │   ├── Makefile
    │   │   ├── foo.hpp
    │   │   ├── main
    │   │   └── main.loc
    │   ├── runtime-error-cpp/
    │   │   ├── Makefile
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── runtime-error-cross-lang/
    │   │   ├── Makefile
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── runtime-error-py/
    │   │   ├── Makefile
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── runtime-error-r/
    │   │   ├── Makefile
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── term-masking/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   ├── typechecking-1/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── typechecking-2/
    │   │   ├── Makefile
    │   │   └── foo.loc
    │   ├── typeclass-bad-instance/
    │   │   └── foo.loc
    │   ├── typeclass-bad-instance-expr/
    │   │   └── foo.loc
    │   ├── typeclass-masking/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   ├── typeclass-monomorphic-conflict/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   ├── typeclass-overlap/
    │   │   ├── foo.loc
    │   │   ├── foo2.loc
    │   │   └── foo3.loc
    │   └── undefined-term/
    │       ├── Makefile
    │       └── foo.loc
    ├── executable-benchmark/
    │   ├── .gitignore
    │   ├── README
    │   ├── distributed/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── foo.cpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── main.yaml
    │   ├── parallel-interop/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── parallel.py
    │   │   └── test.sh
    │   └── serial-interop/
    │       ├── .gitignore
    │       ├── Makefile
    │       ├── foo.R
    │       ├── foo.hpp
    │       ├── foo.loc
    │       ├── foo.py
    │       ├── long-list.json
    │       ├── medium-list.json
    │       └── test.sh
    ├── golden-tests/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── alias-array-monoid/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-concrete-bugs/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-constructor-equiv/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-dedup-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── alias-no-cross-instance/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-3-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-3-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-3-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-4-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-4-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-4-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-5-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-5-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-5-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-6-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-6-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-6-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-7-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-7-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-7-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-8-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-8-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── argument-form-8-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── arrow-immutable-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── arrow-immutable-pc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── arrow-immutable-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── arrow-immutable-rp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── arrow-nexus-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── arrow-nexus-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.py
    │   ├── bare-selector-args/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── bare-selector-chain/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── bug-intrinsic-schema-crash/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── bug-load-type-infer/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-10/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── sequence_align.hpp
    │   │   ├── sequence_io.py
    │   │   └── sequence_stats.R
    │   ├── claude-test-11/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── sysinfo.R
    │   │   ├── sysinfo.hpp
    │   │   └── sysinfo.py
    │   ├── claude-test-12/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-13/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── stress.hpp
    │   │   └── stress.py
    │   ├── claude-test-14/
    │   │   ├── Makefile
    │   │   ├── edge.hpp
    │   │   ├── edge.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-15/
    │   │   ├── Makefile
    │   │   ├── bigdata.hpp
    │   │   ├── bigdata.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-16/
    │   │   ├── Makefile
    │   │   ├── cstress.hpp
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── pstress.py
    │   ├── claude-test-17/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-18/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-19/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-20/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── claude-test-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── claude-test-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── game.hpp
    │   │   ├── game.py
    │   │   ├── main.loc
    │   │   └── package.yaml
    │   ├── claude-test-6/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── filters.hpp
    │   │   ├── image_io.py
    │   │   ├── main.loc
    │   │   └── stats.R
    │   ├── claude-test-7/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── aggregations.hpp
    │   │   ├── data_io.py
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── statistics.R
    │   ├── claude-test-8/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── string_ops.hpp
    │   │   ├── text_processing.py
    │   │   └── text_stats.R
    │   ├── claude-test-9/
    │   │   ├── Makefile
    │   │   ├── README.md
    │   │   ├── exp.txt
    │   │   ├── finance_stats.R
    │   │   ├── helpers.py
    │   │   ├── main.loc
    │   │   ├── market_io.py
    │   │   ├── monte_carlo.hpp
    │   │   └── test-map.loc
    │   ├── command-groups/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── composition/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── paste.py
    │   ├── demo-trimming/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── config.json
    │   │   ├── example.fastq
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── edge-cases-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── edge-cases-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── effect-accumulate-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── effect-coerce-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── effect-coerce-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── effect-error-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── effect-multi-label-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── effect-subtype-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── errors/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── eta-reduction-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── eta-reduction-8-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── eta-reduction-8-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── eval-restrict-source/
    │   │   ├── Makefile
    │   │   └── exp.txt
    │   ├── feature-integration-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── file-input-c/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── main.loc
    │   │   └── run.sh
    │   ├── file-input-py/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── run.sh
    │   ├── file-input-r/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── main.loc
    │   │   └── run.sh
    │   ├── force-inline-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── formatting/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── functional-data-1/
    │   │   ├── Makefile
    │   │   ├── bar.py
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── functional-data-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── functional-data-3a/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── functional-data-3b/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.hpp
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3d/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3d-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.hpp
    │   │   └── main.loc
    │   ├── functional-data-3d-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3d-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.R
    │   │   └── main.loc
    │   ├── functional-data-3e/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-3f/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── functional-data-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── generic-hofs-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── generic-hofs-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── guards-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-inline-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-let-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-let-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-let-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── guards-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── higher-kinded-types/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── notes
    │   ├── hofs-1/
    │   │   ├── Makefile
    │   │   ├── eq.py
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── holes-func/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── holes-record/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── holes-simple/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── import-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── import-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── localmap/
    │   │   │   ├── main.loc
    │   │   │   └── main.py
    │   │   └── main.loc
    │   ├── infix/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── impl.py
    │   │   └── main.loc
    │   ├── infix-generic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── infix-import/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── ops/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-local-fixity/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── ops-a/
    │   │   │   ├── main.loc
    │   │   │   └── ops.py
    │   │   └── ops-b/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-polyglot/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── ops/
    │   │   │   └── main.loc
    │   │   ├── ops-cpp/
    │   │   │   ├── main.loc
    │   │   │   └── ops.hpp
    │   │   └── ops-py/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-typeclass-import/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── numops/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-typeclass-polyglot/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── semiring/
    │   │   │   └── main.loc
    │   │   ├── semiring-cpp/
    │   │   │   ├── main.loc
    │   │   │   └── ops.hpp
    │   │   └── semiring-py/
    │   │       ├── main.loc
    │   │       └── ops.py
    │   ├── infix-typeclass-simple/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-block-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-cross-lang/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-deep-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-func-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-ho-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-mixed-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-old-style-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-op-ho-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── inline-op-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── inline-typeclass-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── ops.py
    │   ├── interop-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── interop-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── interop-10/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── interop-11/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── incdef.hpp
    │   │   ├── main.loc
    │   │   └── pysum.py
    │   ├── interop-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3a-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3a-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   └── main.loc
    │   ├── interop-3a-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3a-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3b-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3c-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3d-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-pp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3e-rc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-3f/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── interop-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── fooc.loc
    │   │   ├── foopy.loc
    │   │   └── main.loc
    │   ├── interop-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.loc
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   └── main.loc
    │   ├── interop-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── interop-8-py-to-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── interop-8-r-to-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── interop-8-r-to-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── interop-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── intrinsic-agnostic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── hello.json
    │   │   └── main.loc
    │   ├── intrinsic-constants/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── intrinsic-hash/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── intrinsic-show-ho-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── intrinsic-show-read/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── intrinsic-show-read-nexus/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── let-crosslang/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── f.hpp
    │   │   ├── f.py
    │   │   └── main.loc
    │   ├── let-expressions/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── local-import-cousin-py/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   └── baz/
    │   │   │       ├── main.loc
    │   │   │       └── main.py
    │   │   ├── bif/
    │   │   │   └── biz/
    │   │   │       ├── main.loc
    │   │   │       └── main.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── local-import-nested-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── lib/
    │   │   │   └── math/
    │   │   │       ├── main.loc
    │   │   │       └── main.py
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   ├── util.loc
    │   │   └── util.py
    │   ├── local-import-root-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── root/
    │   │       ├── main.loc
    │   │       └── main.py
    │   ├── manifold-form-0/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t0.loc
    │   ├── manifold-form-0x/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── manifold-form-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t1.loc
    │   ├── manifold-form-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t2.loc
    │   ├── manifold-form-2x/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t2.loc
    │   ├── manifold-form-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t3.loc
    │   ├── manifold-form-3x/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t3.loc
    │   ├── manifold-form-4_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t4.loc
    │   ├── manifold-form-4_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t4.loc
    │   ├── manifold-form-4_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── manifold-form-5_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t5.loc
    │   ├── manifold-form-5_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t5.loc
    │   ├── manifold-form-5_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t5.loc
    │   ├── manifold-form-6_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t6.loc
    │   ├── manifold-form-6_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t6.loc
    │   ├── manifold-form-6_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t6.loc
    │   ├── manifold-form-7_c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t7.loc
    │   ├── manifold-form-7_py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t7.loc
    │   ├── manifold-form-7_r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── t7.loc
    │   ├── memory-interop-misalign-cp/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── memory-nested-misalign-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── memory-nested-misalign-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── memory-optional-double-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── memory-optional-double-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── memory-record-pack-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── memory-record-pack-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── memory-split-block-cpp/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── module-form-00n/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-011/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-01n/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-0n0/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-0n1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-101/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-10n/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-110/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-111/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-1n0/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-n00/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-n01/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── module-form-n10/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── foopy.loc
    │   │   ├── foor.loc
    │   │   ├── fooroot.loc
    │   │   └── main.loc
    │   ├── multi-lang-mempty-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── multiple-instances-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.h
    │   ├── multiple-instances-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.py
    │   ├── multiple-instances-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.R
    │   ├── multiple-instances-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.h
    │   ├── multiple-instances-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.py
    │   ├── multiple-instances-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── rms.R
    │   │   └── rms.py
    │   ├── multiprocessing-py-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── namespace-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-disambiguation/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-composition/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-double-import/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-exported/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-guard/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-hof/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-let/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-multi/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── mod-a.loc
    │   │   ├── mod-b.loc
    │   │   └── mod-c.loc
    │   ├── namespace-ns-nested-getter/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-reexport/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   ├── main.loc
    │   │   └── middle.loc
    │   ├── namespace-ns-same-func-name/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-shadow/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-ns-unqualified/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-selective/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helpers.loc
    │   │   └── main.loc
    │   ├── namespace-separate-impls/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── mod-a.loc
    │   │   └── mod-b.loc
    │   ├── nat-typecheck/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── native-morloc-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── native-morloc-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── native-morloc-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── high.loc
    │   │   └── high.py
    │   ├── native-morloc-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── native-morloc-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-8/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── native-morloc-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── nexus-let-lambda/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── nexus-let-pure/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── null-keyword/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.R
    │   │   ├── main.hpp
    │   │   ├── main.loc
    │   │   └── main.py
    │   ├── numeric-literals/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── object-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.h
    │   ├── object-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.py
    │   ├── object-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.R
    │   ├── optional-coerce-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── optional-coerce-interop/
    │   │   ├── Makefile
    │   │   ├── cfoo.hpp
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── pfoo.py
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── optional-coerce-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── optional-interop-cp/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   └── types.loc
    │   ├── optional-interop-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── pyfuncs.loc
    │   │   ├── rfuncs.loc
    │   │   └── types.loc
    │   ├── optional-interop-rc/
    │   │   ├── Makefile
    │   │   ├── cppfuncs.loc
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── main.loc
    │   │   ├── rfuncs.loc
    │   │   └── types.loc
    │   ├── optional-json/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── optional-records-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── optional-records-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── optional-records-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── packer-definitions-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── packer-definitions-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── lib/
    │   │   │   └── json/
    │   │   │       ├── json.py
    │   │   │       └── main.loc
    │   │   └── main.loc
    │   ├── packer-definitions-3/
    │   │   ├── Makefile
    │   │   ├── dumby.hpp
    │   │   ├── dumby.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── packer-definitions-4/
    │   │   ├── Makefile
    │   │   ├── dumby.hpp
    │   │   ├── dumby.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── packer-definitions-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── map.hpp
    │   │   └── map.py
    │   ├── packets-interop/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.h
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── make_test_data.py
    │   ├── packets-large/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.h
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   ├── make_test_data.py
    │   │   └── test-data.mpk
    │   ├── parser-stress/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── path-shadowing-c/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   ├── main.hpp
    │   │   │   └── main.loc
    │   │   ├── baz/
    │   │   │   ├── main.hpp
    │   │   │   └── main.loc
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── path-shadowing-py/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   ├── main.loc
    │   │   │   └── main.py
    │   │   ├── baz/
    │   │   │   ├── main.loc
    │   │   │   └── main.py
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── path-shadowing-r/
    │   │   ├── Makefile
    │   │   ├── bar/
    │   │   │   ├── main.R
    │   │   │   └── main.loc
    │   │   ├── baz/
    │   │   │   ├── main.R
    │   │   │   └── main.loc
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── pattern-getters/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── pattern-setters/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main-cpp.loc
    │   │   ├── main-py.loc
    │   │   ├── main-r.loc
    │   │   ├── tests.loc
    │   │   └── types.hpp
    │   ├── poly-list-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── record-docstrings/
    │   │   ├── Makefile
    │   │   ├── algconf.json
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── sysconf.json
    │   ├── records-alias/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   ├── lib/
    │   │   │   └── main.loc
    │   │   └── main.loc
    │   ├── records-complex-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── records-complex-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── records-nested/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── records-primitive/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── recursion-cross-py-cpp/
    │   │   ├── Makefile
    │   │   ├── cpp_helpers.hpp
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── py_helpers.py
    │   ├── recursion-cross-r-cpp/
    │   │   ├── Makefile
    │   │   ├── cpp_helpers.hpp
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── r_helpers.R
    │   ├── recursion-direct-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-direct-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-direct-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-helper-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-helper-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-mutual-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-mutual-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-mutual-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── recursion-thunk-helper-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── recursion-thunk-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── scoping-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-10/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── high.loc
    │   │   ├── high.py
    │   │   └── low.loc
    │   ├── scoping-11/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── scoping-12/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── scoping-13/
    │   │   ├── Makefile
    │   │   ├── core.hpp
    │   │   ├── exp.txt
    │   │   ├── foo/
    │   │   │   ├── main.loc
    │   │   │   └── test/
    │   │   │       ├── bar.py
    │   │   │       └── main.loc
    │   │   ├── foo-cpp.loc
    │   │   └── main.loc
    │   ├── scoping-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-8/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── scoping-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── w.loc
    │   ├── selection-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── selection-2/
    │   │   ├── Makefile
    │   │   ├── arithmetic/
    │   │   │   └── main.loc
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── selection-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rms.R
    │   ├── selection-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-10-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-10-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-10-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-11-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-11-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-11-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-12-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-12-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-12-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-4-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-4-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-4-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-5-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-5-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-5-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-6-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-6-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-6-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-7-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-7-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-7-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-8-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-8-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-8-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-9-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-9-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── serial-form-9-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── slurm-label-codegen/
    │   │   ├── Makefile
    │   │   ├── bar.py
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── main.yaml
    │   ├── source-old-op-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── specialization-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── specialization-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── specialization-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   └── main.loc
    │   ├── specialization-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── specialization-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── stderr-stdout/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   ├── main.loc
    │   │   └── package.yaml
    │   ├── stdout-flush-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── fun.py
    │   │   └── main.loc
    │   ├── string-encoding/
    │   │   ├── .gitignore
    │   │   ├── Makefile
    │   │   ├── a.json
    │   │   ├── b.json
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── string-encoding-utf8/
    │   │   ├── Makefile
    │   │   ├── a.json
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── string-escape/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── helper.R
    │   │   ├── helper.hpp
    │   │   ├── helper.py
    │   │   └── main.loc
    │   ├── string-interpolation/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── string-json-parsing/
    │   │   ├── Makefile
    │   │   ├── a.json
    │   │   ├── b.json
    │   │   ├── c.json
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── string-multiline/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── string-pretty/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-1-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-1-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-1-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── table-2-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.h
    │   ├── table-2-py/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.py
    │   ├── table-2-r/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── person.R
    │   ├── tensor-comprehensive-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── tensor-comprehensive-cross/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-cp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-dimensions/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-nat-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── labeled.hpp
    │   │   └── main.loc
    │   ├── tensor-nat-labeled/
    │   │   ├── Makefile
    │   │   ├── cnn.hpp
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── tensor-nexus-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── tensor-pc/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.hpp
    │   │   └── src.py
    │   ├── tensor-pr/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── tensor-rp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   ├── src.R
    │   │   └── src.py
    │   ├── tensor-table-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── src.hpp
    │   ├── thunk-basic/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-choose/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-cross-force/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-do/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-effects/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-eval-forall/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rng.py
    │   ├── thunk-eval-hk/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── rng.py
    │   ├── thunk-export/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-export-guard/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-force/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-guard-cross/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-interop/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.R
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── thunk-let/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   ├── thunk-nullary-interop/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── two-module/
    │   │   ├── Makefile
    │   │   ├── combat.loc
    │   │   ├── exp.txt
    │   │   ├── tavern.loc
    │   │   ├── util.loc
    │   │   └── util.py
    │   ├── type-alias-transitive/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── main.loc
    │   │   ├── types/
    │   │   │   └── main.loc
    │   │   └── types-cpp.loc
    │   ├── type-annotations-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── type-identities-c/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── main.loc
    │   │   └── types.h
    │   ├── type-synthesis-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── type-synthesis-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── lib/
    │   │   │   ├── foo/
    │   │   │   │   ├── foo.py
    │   │   │   │   └── main.loc
    │   │   │   └── footypes/
    │   │   │       └── main.loc
    │   │   └── main.loc
    │   ├── typeclass-stress/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-1/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-2/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-3/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-4/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-5/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-6/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   └── main.loc
    │   ├── typeclasses-7/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-8/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── typeclasses-9/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-edge-cases/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-interop/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-interpolation/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-source/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   ├── foo.py
    │   │   └── main.loc
    │   ├── unicode-source-cpp/
    │   │   ├── Makefile
    │   │   ├── exp.txt
    │   │   ├── foo.hpp
    │   │   └── main.loc
    │   └── unit-1/
    │       ├── Makefile
    │       ├── exp.txt
    │       ├── foo.py
    │       └── main.loc
    ├── install-tests/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── run-tests.sh
    │   ├── testcpp1/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── square.hpp
    │   ├── testcpp2/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── src/
    │   │       └── dbl.hpp
    │   ├── testcpp3/
    │   │   ├── inc.hpp
    │   │   ├── main.loc
    │   │   └── offset.hpp
    │   ├── testdatafile1/
    │   │   ├── data.txt
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── reader.py
    │   ├── testpy1/
    │   │   ├── helpers.py
    │   │   ├── main.loc
    │   │   └── package.yaml
    │   ├── testpy2/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── src/
    │   │       └── mathutil.py
    │   ├── testpy3/
    │   │   ├── fmtlib.py
    │   │   ├── formatter.py
    │   │   └── main.loc
    │   ├── testr1/
    │   │   ├── main.loc
    │   │   ├── negate.R
    │   │   └── package.yaml
    │   ├── testr2/
    │   │   ├── main.loc
    │   │   ├── package.yaml
    │   │   └── src/
    │   │       └── triple.R
    │   └── testr3/
    │       ├── glue.R
    │       ├── main.loc
    │       └── rutil.R
    ├── integration/
    │   ├── Main.hs
    │   └── Morloc/
    │       └── Test/
    │           ├── Common.hs
    │           ├── ConcurrencyTests.hs
    │           ├── DaemonTests.hs
    │           ├── InstallTests.hs
    │           ├── ShmTests.hs
    │           └── StressTests.hs
    ├── shm-tests/
    │   ├── cppfuncs.loc
    │   ├── main.loc
    │   ├── pyfuncs.loc
    │   ├── stress.hpp
    │   ├── stress.py
    │   └── types.loc
    ├── stress/
    │   ├── .gitignore
    │   ├── README.md
    │   ├── common.sh
    │   ├── concurrent-stress.sh
    │   ├── crash-recovery.sh
    │   ├── run-all.sh
    │   ├── valgrind-check.sh
    │   └── zombie-stress.sh
    ├── test.sh
    └── typecheck-benchmark/
        ├── apply-ann-20.loc
        ├── apply-deep-10.loc
        ├── apply-deep-100.loc
        ├── apply-deep-30.loc
        ├── apply-deep-50.loc
        ├── apply-deep.loc
        ├── apply-multi-arg-20.loc
        ├── compose-10.loc
        ├── compose-20.loc
        ├── compose-40.loc
        ├── partial-app.loc
        ├── poly-compose.loc
        ├── run-benchmarks.sh
        └── tuple-nested-20.loc
Download .txt
Showing preview only (223K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2679 symbols across 397 files)

FILE: data/lang/cpp/cppmorloc.cpp
  function absptr_t (line 7) | absptr_t cpp_rel2abs(relptr_t ptr){
  function relptr_t (line 17) | relptr_t abs2rel_cpp(absptr_t ptr){
  function shfree_cpp (line 27) | bool shfree_cpp(absptr_t ptr){
  function Schema (line 37) | Schema* parse_schema_cpp(const char* schema_ptr){
  function shm_t (line 57) | shm_t* shinit_cpp(const char* shm_basename, size_t volume_index, size_t ...
  function pack_with_schema_cpp (line 67) | int pack_with_schema_cpp(const void* mlc, const Schema* schema, char** m...
  function unpack_with_schema_cpp (line 77) | int unpack_with_schema_cpp(const char* mgk, size_t mgk_size, const Schem...

FILE: data/lang/cpp/cppmorloc.hpp
  type is_std_vector (line 26) | struct is_std_vector : std::false_type {}
  type is_std_vector<std::vector<T, A>> (line 27) | struct is_std_vector<std::vector<T, A>> : std::true_type {}
  type is_std_list (line 29) | struct is_std_list : std::false_type {}
  type is_std_list<std::list<T, A>> (line 30) | struct is_std_list<std::list<T, A>> : std::true_type {}
  type is_std_forward_list (line 32) | struct is_std_forward_list : std::false_type {}
  type is_std_forward_list<std::forward_list<T, A>> (line 33) | struct is_std_forward_list<std::forward_list<T, A>> : std::true_type {}
  type is_std_deque (line 35) | struct is_std_deque : std::false_type {}
  type is_std_deque<std::deque<T, A>> (line 36) | struct is_std_deque<std::deque<T, A>> : std::true_type {}
  type is_std_stack (line 38) | struct is_std_stack : std::false_type {}
  type is_std_stack<std::stack<T, C>> (line 39) | struct is_std_stack<std::stack<T, C>> : std::true_type {}
  type is_std_queue (line 41) | struct is_std_queue : std::false_type {}
  type is_std_queue<std::queue<T, C>> (line 42) | struct is_std_queue<std::queue<T, C>> : std::true_type {}
  type is_std_tuple (line 44) | struct is_std_tuple : std::false_type {}
  type is_std_tuple<std::tuple<Args...>> (line 45) | struct is_std_tuple<std::tuple<Args...>> : std::true_type {}
  type is_std_pair (line 47) | struct is_std_pair : std::false_type {}
  type is_std_pair<std::pair<A, B>> (line 48) | struct is_std_pair<std::pair<A, B>> : std::true_type {}
  type is_std_optional (line 50) | struct is_std_optional : std::false_type {}
  type is_std_optional<std::optional<T>> (line 51) | struct is_std_optional<std::optional<T>> : std::true_type {}
  function to_vector (line 65) | auto to_vector(const Container& c) {
  function schema_alignment_cpp (line 122) | inline size_t schema_alignment_cpp(const Schema* schema) {
  function get_shm_size (line 151) | size_t get_shm_size(const Schema* schema, const std::nullptr_t&) {
  function get_shm_size (line 157) | size_t get_shm_size(const Schema* schema, const Primitive& data) {
  function get_shm_size (line 162) | size_t get_shm_size(const Schema* schema, const std::vector<T>& data) {
  function get_shm_size (line 196) | size_t get_shm_size(const Schema* schema, const std::optional<T>& data) {
  function get_shm_size (line 205) | size_t get_shm_size(const Schema* schema, const std::string& data) {
  function get_shm_size (line 209) | size_t get_shm_size(void* dest, const Schema* schema, const char* data) {
  function createTupleShmSizeHelper (line 214) | size_t createTupleShmSizeHelper(const Schema* schema, const Tuple& data,...
  function get_shm_size (line 229) | size_t get_shm_size(const Schema* schema, const std::tuple<Args...>& dat...
  function get_shm_size (line 235) | size_t get_shm_size(const Schema* schema, const std::list<T>& data) {
  function get_shm_size (line 240) | size_t get_shm_size(const Schema* schema, const std::forward_list<T>& da...
  function get_shm_size (line 245) | size_t get_shm_size(const Schema* schema, const std::deque<T>& data) {
  function get_shm_size (line 250) | size_t get_shm_size(const Schema* schema, const std::stack<T>& data) {
  function get_shm_size (line 255) | size_t get_shm_size(const Schema* schema, const std::queue<T>& data) {
  function get_shm_size (line 261) | size_t get_shm_size(const Schema* schema, const mlc::Tensor<T, NDim>& da...
  function Tuple (line 511) | Tuple fromTupleAnythingHelper(
  function T (line 525) | T fromAnything(const Schema* schema, const void* data, T*, const void* b...
  function mpk_pack (line 655) | std::vector<char> mpk_pack(const T& data, const std::string& schema_str) {
  function T (line 683) | T mpk_unpack(const std::vector<char>& packed_data, const std::string& sc...

FILE: data/lang/cpp/mlc_arrow.hpp
  type mlc (line 16) | namespace mlc {
    class ArrowTable (line 18) | class ArrowTable {
      method ArrowTable (line 22) | ArrowTable(struct ArrowSchema schema, struct ArrowArray array)
      method ArrowTable (line 36) | ArrowTable(ArrowTable&& other) noexcept
      method ArrowTable (line 43) | ArrowTable& operator=(ArrowTable&& other) noexcept {
      method ArrowTable (line 55) | ArrowTable(const ArrowTable&) = delete;
      method ArrowTable (line 56) | ArrowTable& operator=(const ArrowTable&) = delete;
      type ArrowSchema (line 59) | struct ArrowSchema
      type ArrowArray (line 60) | struct ArrowArray
      method n_columns (line 61) | int64_t n_columns() const { return schema_.n_children; }
      method n_rows (line 62) | int64_t n_rows()    const { return array_.length; }
      method ArrowTable (line 65) | static ArrowTable from_shm(const arrow_shm_header_t* hdr) {
      method relptr_t (line 83) | relptr_t move_to_shm() {
      type ArrowSchema (line 120) | struct ArrowSchema
      type ArrowArray (line 121) | struct ArrowArray

FILE: data/lang/cpp/mlc_tensor.hpp
  type mlc (line 15) | namespace mlc {
    type tensor_storage (line 20) | struct tensor_storage { using type = T; }
    type tensor_storage<bool> (line 21) | struct tensor_storage<bool> { using type = uint8_t; }
    class Tensor (line 25) | class Tensor {
      method Tensor (line 29) | Tensor(const int64_t (&dims)[NDim]) : owns_data_(true) {
      method Tensor (line 37) | Tensor(std::initializer_list<int64_t> dims) : owns_data_(true) {
      method Tensor (line 49) | Tensor(S* data, const int64_t* shape, size_t total)
      method Tensor (line 59) | Tensor(Tensor&& other) noexcept
      method Tensor (line 66) | Tensor& operator=(Tensor&& other) noexcept {
      method Tensor (line 79) | Tensor(const Tensor&) = delete;
      method Tensor (line 80) | Tensor& operator=(const Tensor&) = delete;
      method S (line 83) | const S* data() const { return data_; }
      method S (line 84) | S* data() { return data_; }
      method ndim (line 85) | constexpr int ndim() const { return NDim; }
      method shape (line 87) | int64_t shape(int d) const { return shape_[d]; }
      method size (line 88) | size_t size() const { return total_; }
      method S (line 92) | const S& operator[](size_t i) const { return data_[i]; }
      method S (line 93) | S& operator[](size_t i) { return data_[i]; }
      method S (line 97) | const S& operator()(int64_t i) const { return data_[i]; }
      method S (line 99) | S& operator()(int64_t i) { return data_[i]; }
      method S (line 103) | const S& operator()(int64_t i, int64_t j) const {
      method S (line 107) | S& operator()(int64_t i, int64_t j) {
      method S (line 113) | const S& operator()(int64_t i, int64_t j, int64_t k) const {
      method S (line 117) | S& operator()(int64_t i, int64_t j, int64_t k) {
    type is_mlc_tensor (line 136) | struct is_mlc_tensor : std::false_type {}
    type is_mlc_tensor<Tensor<T, N>> (line 137) | struct is_mlc_tensor<Tensor<T, N>> : std::true_type {}
    type tensor_element (line 142) | struct tensor_element
    type tensor_element<Tensor<T, N>> (line 143) | struct tensor_element<Tensor<T, N>> { using type = T; }
    type tensor_ndim (line 147) | struct tensor_ndim
    type tensor_ndim<Tensor<T, N>> (line 148) | struct tensor_ndim<Tensor<T, N>>

FILE: data/lang/cpp/nanoarrow/nanoarrow.c
  function ArrowNanoarrowVersionInt (line 29) | int ArrowNanoarrowVersionInt(void) { return NANOARROW_VERSION_INT; }
  function ArrowErrorCode (line 31) | ArrowErrorCode ArrowErrorSet(struct ArrowError* error, const char* fmt, ...
  function ArrowLayoutInit (line 52) | void ArrowLayoutInit(struct ArrowLayout* layout, enum ArrowType storage_...
  function ArrowFree (line 221) | void ArrowFree(void* ptr) { free(ptr); }
  type ArrowBufferAllocator (line 224) | struct ArrowBufferAllocator
  function ArrowBufferAllocatorMallocFree (line 231) | static void ArrowBufferAllocatorMallocFree(struct ArrowBufferAllocator* ...
  type ArrowBufferAllocator (line 240) | struct ArrowBufferAllocator
  function ArrowBufferAllocatorDefault (line 243) | struct ArrowBufferAllocator ArrowBufferAllocatorDefault(void) {
  type ArrowBufferAllocator (line 247) | struct ArrowBufferAllocator
  function ArrowBufferDeallocator (line 268) | struct ArrowBufferAllocator ArrowBufferDeallocator(
  function ShiftAndAdd (line 287) | static void ShiftAndAdd(struct ArrowStringView value, uint32_t* out, int...
  function ArrowErrorCode (line 318) | ArrowErrorCode ArrowDecimalSetDigits(struct ArrowDecimal* decimal,
  function ArrowErrorCode (line 378) | ArrowErrorCode ArrowDecimalAppendDigitsToBuffer(const struct ArrowDecima...
  function ArrowErrorCode (line 519) | ArrowErrorCode ArrowDecimalAppendStringToBuffer(const struct ArrowDecima...
  function ArrowSchemaReleaseInternal (line 587) | static void ArrowSchemaReleaseInternal(struct ArrowSchema* schema) {
  type ArrowType (line 628) | enum ArrowType
  function ArrowSchemaInitChildrenIfNeeded (line 705) | static int ArrowSchemaInitChildrenIfNeeded(struct ArrowSchema* schema,
  function ArrowSchemaInit (line 746) | void ArrowSchemaInit(struct ArrowSchema* schema) {
  function ArrowErrorCode (line 758) | ArrowErrorCode ArrowSchemaSetType(struct ArrowSchema* schema, enum Arrow...
  function ArrowErrorCode (line 776) | ArrowErrorCode ArrowSchemaSetTypeStruct(struct ArrowSchema* schema, int6...
  function ArrowErrorCode (line 786) | ArrowErrorCode ArrowSchemaInitFromType(struct ArrowSchema* schema, enum ...
  function ArrowErrorCode (line 798) | ArrowErrorCode ArrowSchemaSetTypeFixedSize(struct ArrowSchema* schema,
  function ArrowErrorCode (line 831) | ArrowErrorCode ArrowSchemaSetTypeDecimal(struct ArrowSchema* schema, enu...
  function ArrowErrorCode (line 885) | ArrowErrorCode ArrowSchemaSetTypeRunEndEncoded(struct ArrowSchema* schema,
  type ArrowTimeUnit (line 907) | enum ArrowTimeUnit
  function ArrowErrorCode (line 922) | ArrowErrorCode ArrowSchemaSetTypeDateTime(struct ArrowSchema* schema, en...
  function ArrowErrorCode (line 988) | ArrowErrorCode ArrowSchemaSetTypeUnion(struct ArrowSchema* schema, enum ...
  function ArrowErrorCode (line 1050) | ArrowErrorCode ArrowSchemaSetFormat(struct ArrowSchema* schema, const ch...
  function ArrowErrorCode (line 1070) | ArrowErrorCode ArrowSchemaSetName(struct ArrowSchema* schema, const char...
  function ArrowErrorCode (line 1090) | ArrowErrorCode ArrowSchemaSetMetadata(struct ArrowSchema* schema, const ...
  function ArrowErrorCode (line 1110) | ArrowErrorCode ArrowSchemaAllocateChildren(struct ArrowSchema* schema,
  function ArrowErrorCode (line 1142) | ArrowErrorCode ArrowSchemaAllocateDictionary(struct ArrowSchema* schema) {
  function ArrowErrorCode (line 1156) | ArrowErrorCode ArrowSchemaDeepCopy(const struct ArrowSchema* schema,
  function ArrowSchemaViewSetPrimitive (line 1211) | static void ArrowSchemaViewSetPrimitive(struct ArrowSchemaView* schema_v...
  function ArrowErrorCode (line 1217) | static ArrowErrorCode ArrowSchemaViewParse(struct ArrowSchemaView* schem...
  function ArrowErrorCode (line 1665) | static ArrowErrorCode ArrowSchemaViewValidateNChildren(
  function ArrowErrorCode (line 1696) | static ArrowErrorCode ArrowSchemaViewValidateUnion(struct ArrowSchemaVie...
  function ArrowErrorCode (line 1701) | static ArrowErrorCode ArrowSchemaViewValidateMap(struct ArrowSchemaView*...
  function ArrowErrorCode (line 1732) | static ArrowErrorCode ArrowSchemaViewValidateDictionary(
  function ArrowErrorCode (line 1758) | static ArrowErrorCode ArrowSchemaViewValidate(struct ArrowSchemaView* sc...
  function ArrowErrorCode (line 1836) | ArrowErrorCode ArrowSchemaViewInit(struct ArrowSchemaView* schema_view,
  function ArrowSchemaTypeToStringInternal (line 1934) | static int64_t ArrowSchemaTypeToStringInternal(struct ArrowSchemaView* s...
  function ArrowToStringLogChars (line 1965) | static inline void ArrowToStringLogChars(char** out, int64_t n_chars_last,
  function ArrowSchemaToString (line 1987) | int64_t ArrowSchemaToString(const struct ArrowSchema* schema, char* out,...
  function ArrowErrorCode (line 2076) | ArrowErrorCode ArrowMetadataReaderInit(struct ArrowMetadataReader* reader,
  function ArrowErrorCode (line 2091) | ArrowErrorCode ArrowMetadataReaderRead(struct ArrowMetadataReader* reader,
  function ArrowMetadataSizeOf (line 2121) | int64_t ArrowMetadataSizeOf(const char* metadata) {
  function ArrowErrorCode (line 2141) | static ArrowErrorCode ArrowMetadataGetValueInternal(const char* metadata,
  function ArrowErrorCode (line 2163) | ArrowErrorCode ArrowMetadataGetValue(const char* metadata, struct ArrowS...
  function ArrowMetadataHasKey (line 2172) | char ArrowMetadataHasKey(const char* metadata, struct ArrowStringView ke...
  function ArrowErrorCode (line 2181) | ArrowErrorCode ArrowMetadataBuilderInit(struct ArrowBuffer* buffer,
  function ArrowErrorCode (line 2187) | static ArrowErrorCode ArrowMetadataBuilderAppendInternal(struct ArrowBuf...
  function ArrowErrorCode (line 2221) | static ArrowErrorCode ArrowMetadataBuilderSetInternal(struct ArrowBuffer...
  function ArrowErrorCode (line 2275) | ArrowErrorCode ArrowMetadataBuilderAppend(struct ArrowBuffer* buffer,
  function ArrowErrorCode (line 2281) | ArrowErrorCode ArrowMetadataBuilderSet(struct ArrowBuffer* buffer,
  function ArrowErrorCode (line 2287) | ArrowErrorCode ArrowMetadataBuilderRemove(struct ArrowBuffer* buffer,
  function ArrowArrayReleaseInternal (line 2318) | static void ArrowArrayReleaseInternal(struct ArrowArray* array) {
  function ArrowArrayIsInternal (line 2366) | static int ArrowArrayIsInternal(struct ArrowArray* array) {
  function ArrowErrorCode (line 2370) | static ArrowErrorCode ArrowArraySetStorageType(struct ArrowArray* array,
  function ArrowErrorCode (line 2436) | ArrowErrorCode ArrowArrayInitFromType(struct ArrowArray* array,
  function ArrowErrorCode (line 2503) | ArrowErrorCode ArrowArrayInitFromArrayView(struct ArrowArray* array,
  function ArrowErrorCode (line 2549) | ArrowErrorCode ArrowArrayInitFromSchema(struct ArrowArray* array,
  function ArrowErrorCode (line 2570) | ArrowErrorCode ArrowArrayAllocateChildren(struct ArrowArray* array, int6...
  function ArrowErrorCode (line 2599) | ArrowErrorCode ArrowArrayAllocateDictionary(struct ArrowArray* array) {
  function ArrowArraySetValidityBitmap (line 2613) | void ArrowArraySetValidityBitmap(struct ArrowArray* array, struct ArrowB...
  function ArrowErrorCode (line 2623) | ArrowErrorCode ArrowArraySetBuffer(struct ArrowArray* array, int64_t i,
  function ArrowErrorCode (line 2648) | static ArrowErrorCode ArrowArrayViewInitFromArray(struct ArrowArrayView*...
  function ArrowErrorCode (line 2707) | static ArrowErrorCode ArrowArrayReserveInternal(struct ArrowArray* array,
  function ArrowErrorCode (line 2735) | ArrowErrorCode ArrowArrayReserve(struct ArrowArray* array,
  function ArrowErrorCode (line 2753) | static ArrowErrorCode ArrowArrayFinalizeBuffers(struct ArrowArray* array) {
  function ArrowErrorCode (line 2782) | static ArrowErrorCode ArrowArrayFlushInternalPointers(struct ArrowArray*...
  function ArrowErrorCode (line 2828) | ArrowErrorCode ArrowArrayFinishBuilding(struct ArrowArray* array,
  function ArrowErrorCode (line 2856) | ArrowErrorCode ArrowArrayFinishBuildingDefault(struct ArrowArray* array,
  function ArrowArrayViewInitFromType (line 2861) | void ArrowArrayViewInitFromType(struct ArrowArrayView* array_view,
  function ArrowErrorCode (line 2868) | ArrowErrorCode ArrowArrayViewAllocateChildren(struct ArrowArrayView* arr...
  function ArrowErrorCode (line 2903) | ArrowErrorCode ArrowArrayViewAllocateDictionary(struct ArrowArrayView* a...
  function ArrowErrorCode (line 2918) | ArrowErrorCode ArrowArrayViewInitFromSchema(struct ArrowArrayView* array...
  function ArrowArrayViewReset (line 2980) | void ArrowArrayViewReset(struct ArrowArrayView* array_view) {
  function ArrowArrayViewSetLength (line 3004) | void ArrowArrayViewSetLength(struct ArrowArrayView* array_view, int64_t ...
  function ArrowArrayViewSetArrayInternal (line 3056) | static int ArrowArrayViewSetArrayInternal(struct ArrowArrayView* array_v...
  function ArrowArrayViewValidateMinimal (line 3142) | static int ArrowArrayViewValidateMinimal(struct ArrowArrayView* array_view,
  function ArrowArrayViewValidateDefault (line 3367) | static int ArrowArrayViewValidateDefault(struct ArrowArrayView* array_view,
  function ArrowErrorCode (line 3568) | ArrowErrorCode ArrowArrayViewSetArray(struct ArrowArrayView* array_view,
  function ArrowErrorCode (line 3581) | ArrowErrorCode ArrowArrayViewSetArrayMinimal(struct ArrowArrayView* arra...
  function ArrowAssertIncreasingInt32 (line 3594) | static int ArrowAssertIncreasingInt32(struct ArrowBufferView view,
  function ArrowAssertIncreasingInt64 (line 3610) | static int ArrowAssertIncreasingInt64(struct ArrowBufferView view,
  function ArrowAssertRangeInt8 (line 3626) | static int ArrowAssertRangeInt8(struct ArrowBufferView view, int8_t min_...
  function ArrowAssertInt8In (line 3641) | static int ArrowAssertInt8In(struct ArrowBufferView view, const int8_t* ...
  function ArrowArrayViewValidateFull (line 3662) | static int ArrowArrayViewValidateFull(struct ArrowArrayView* array_view,
  function ArrowErrorCode (line 3815) | ArrowErrorCode ArrowArrayViewValidate(struct ArrowArrayView* array_view,
  type ArrowComparisonInternalState (line 3834) | struct ArrowComparisonInternalState {
  function NANOARROW_CHECK_PRINTF_ATTRIBUTE (line 3840) | NANOARROW_CHECK_PRINTF_ATTRIBUTE static void ArrowComparePrependPath(
  function ArrowArrayViewCompareBuffer (line 3880) | static void ArrowArrayViewCompareBuffer(const struct ArrowArrayView* act...
  function ArrowArrayViewCompareIdentical (line 3895) | static void ArrowArrayViewCompareIdentical(const struct ArrowArrayView* ...
  function ArrowErrorCode (line 3936) | ArrowErrorCode ArrowArrayViewCompare(const struct ArrowArrayView* actual,
  type BasicArrayStreamPrivate (line 3984) | struct BasicArrayStreamPrivate {
  function ArrowBasicArrayStreamGetSchema (line 3991) | static int ArrowBasicArrayStreamGetSchema(struct ArrowArrayStream* array...
  function ArrowBasicArrayStreamGetNext (line 4002) | static int ArrowBasicArrayStreamGetNext(struct ArrowArrayStream* array_s...
  type ArrowArrayStream (line 4021) | struct ArrowArrayStream
  function ArrowBasicArrayStreamRelease (line 4026) | static void ArrowBasicArrayStreamRelease(struct ArrowArrayStream* array_...
  function ArrowErrorCode (line 4052) | ArrowErrorCode ArrowBasicArrayStreamInit(struct ArrowArrayStream* array_...
  function ArrowBasicArrayStreamSetArray (line 4089) | void ArrowBasicArrayStreamSetArray(struct ArrowArrayStream* array_stream...
  function ArrowErrorCode (line 4096) | ArrowErrorCode ArrowBasicArrayStreamValidate(const struct ArrowArrayStre...

FILE: data/lang/cpp/nanoarrow/nanoarrow.h
  type ArrowSchema (line 95) | struct ArrowSchema {
  type ArrowArray (line 111) | struct ArrowArray {
  type ArrowArrayStream (line 133) | struct ArrowArrayStream {
  type ArrowErrorCode (line 245) | typedef int ArrowErrorCode;
  type ArrowError (line 258) | struct ArrowError {
  function ArrowErrorInit (line 267) | static inline void ArrowErrorInit(struct ArrowError* error) {
  type ArrowError (line 278) | struct ArrowError
  function ArrowErrorSetString (line 290) | static inline void ArrowErrorSetString(struct ArrowError* error, const c...
  function ArrowSchemaMove (line 359) | static inline void ArrowSchemaMove(struct ArrowSchema* src, struct Arrow...
  function ArrowSchemaRelease (line 367) | static inline void ArrowSchemaRelease(struct ArrowSchema* schema) {
  function ArrowArrayMove (line 373) | static inline void ArrowArrayMove(struct ArrowArray* src, struct ArrowAr...
  function ArrowArrayRelease (line 381) | static inline void ArrowArrayRelease(struct ArrowArray* array) {
  function ArrowArrayStreamMove (line 387) | static inline void ArrowArrayStreamMove(struct ArrowArrayStream* src,
  type ArrowArrayStream (line 397) | struct ArrowArrayStream
  function ArrowErrorCode (line 408) | static inline ArrowErrorCode ArrowArrayStreamGetSchema(
  function ArrowErrorCode (line 421) | static inline ArrowErrorCode ArrowArrayStreamGetNext(
  function ArrowArrayStreamRelease (line 434) | static inline void ArrowArrayStreamRelease(struct ArrowArrayStream* arra...
  function _ArrowIsLittleEndian (line 440) | static char _ArrowIsLittleEndian(void) {
  type ArrowType (line 453) | enum ArrowType {
  type ArrowType (line 506) | enum ArrowType
  type ArrowType (line 508) | enum ArrowType
  type ArrowTimeUnit (line 610) | enum ArrowTimeUnit {
  type ArrowValidationLevel (line 619) | enum ArrowValidationLevel {
  type ArrowCompareLevel (line 638) | enum ArrowCompareLevel {
  type ArrowTimeUnit (line 651) | enum ArrowTimeUnit
  type ArrowTimeUnit (line 653) | enum ArrowTimeUnit
  type ArrowBufferType (line 670) | enum ArrowBufferType {
  type ArrowStringView (line 689) | struct ArrowStringView {
  type ArrowStringView (line 703) | struct ArrowStringView
  function ArrowCharView (line 705) | static inline struct ArrowStringView ArrowCharView(const char* value) {
  type ArrowBufferView (line 736) | struct ArrowBufferView {
  type ArrowBufferAllocator (line 752) | struct ArrowBufferAllocator {
  type ArrowBufferAllocator (line 764) | struct ArrowBufferAllocator
  type ArrowBuffer (line 769) | struct ArrowBuffer {
  type ArrowBitmap (line 787) | struct ArrowBitmap {
  type ArrowLayout (line 801) | struct ArrowLayout {
  type ArrowArrayView (line 825) | struct ArrowArrayView {
  type ArrowArrayPrivateData (line 882) | struct ArrowArrayPrivateData {
  type ArrowInterval (line 918) | struct ArrowInterval {
  function ArrowIntervalInit (line 933) | static inline void ArrowIntervalInit(struct ArrowInterval* interval,
  type ArrowDecimal (line 945) | struct ArrowDecimal {
  function ArrowDecimalInit (line 969) | static inline void ArrowDecimalInit(struct ArrowDecimal* decimal, int32_...
  function ArrowDecimalGetIntUnsafe (line 991) | static inline int64_t ArrowDecimalGetIntUnsafe(const struct ArrowDecimal...
  function ArrowDecimalGetBytes (line 1003) | static inline void ArrowDecimalGetBytes(const struct ArrowDecimal* decimal,
  function ArrowDecimalSign (line 1014) | static inline int64_t ArrowDecimalSign(const struct ArrowDecimal* decima...
  function ArrowDecimalSetInt (line 1024) | static inline void ArrowDecimalSetInt(struct ArrowDecimal* decimal, int6...
  function ArrowDecimalNegate (line 1042) | static inline void ArrowDecimalNegate(struct ArrowDecimal* decimal) {
  function ArrowDecimalSetBytes (line 1072) | static inline void ArrowDecimalSetBytes(struct ArrowDecimal* decimal,
  type ArrowSchema (line 1293) | struct ArrowSchema
  type ArrowSchema (line 1293) | struct ArrowSchema
  type ArrowSchema (line 1297) | struct ArrowSchema
  type ArrowArray (line 1301) | struct ArrowArray
  type ArrowArray (line 1301) | struct ArrowArray
  type ArrowArray (line 1304) | struct ArrowArray
  type ArrowArrayStream (line 1308) | struct ArrowArrayStream
  type ArrowArrayStream (line 1309) | struct ArrowArrayStream
  type ArrowArrayStream (line 1319) | struct ArrowArrayStream
  type ArrowSchema (line 1319) | struct ArrowSchema
  type ArrowError (line 1320) | struct ArrowError
  type ArrowArrayStream (line 1330) | struct ArrowArrayStream
  type ArrowArray (line 1330) | struct ArrowArray
  type ArrowError (line 1331) | struct ArrowError
  type ArrowArrayStream (line 1341) | struct ArrowArrayStream
  type ArrowArrayStream (line 1344) | struct ArrowArrayStream
  type ArrowError (line 1368) | struct ArrowError
  type ArrowLayout (line 1384) | struct ArrowLayout
  type ArrowType (line 1385) | enum ArrowType
  type ArrowStringView (line 1388) | struct ArrowStringView
  type ArrowDecimal (line 1391) | struct ArrowDecimal
  type ArrowStringView (line 1392) | struct ArrowStringView
  type ArrowDecimal (line 1396) | struct ArrowDecimal
  type ArrowBuffer (line 1396) | struct ArrowBuffer
  type ArrowDecimal (line 1400) | struct ArrowDecimal
  type ArrowBuffer (line 1400) | struct ArrowBuffer
  type ArrowSchema (line 1429) | struct ArrowSchema
  type ArrowSchema (line 1437) | struct ArrowSchema
  type ArrowType (line 1438) | enum ArrowType
  type ArrowSchema (line 1446) | struct ArrowSchema
  type ArrowSchema (line 1457) | struct ArrowSchema
  type ArrowType (line 1458) | enum ArrowType
  type ArrowSchema (line 1465) | struct ArrowSchema
  type ArrowSchema (line 1476) | struct ArrowSchema
  type ArrowType (line 1477) | enum ArrowType
  type ArrowSchema (line 1486) | struct ArrowSchema
  type ArrowType (line 1487) | enum ArrowType
  type ArrowSchema (line 1499) | struct ArrowSchema
  type ArrowType (line 1500) | enum ArrowType
  type ArrowSchema (line 1509) | struct ArrowSchema
  type ArrowType (line 1510) | enum ArrowType
  type ArrowTimeUnit (line 1511) | enum ArrowTimeUnit
  type ArrowSchema (line 1519) | struct ArrowSchema
  type ArrowType (line 1520) | enum ArrowType
  type ArrowSchema (line 1526) | struct ArrowSchema
  type ArrowSchema (line 1527) | struct ArrowSchema
  type ArrowSchema (line 1533) | struct ArrowSchema
  type ArrowSchema (line 1540) | struct ArrowSchema
  type ArrowSchema (line 1547) | struct ArrowSchema
  type ArrowSchema (line 1555) | struct ArrowSchema
  type ArrowSchema (line 1562) | struct ArrowSchema
  type ArrowMetadataReader (line 1574) | struct ArrowMetadataReader {
  type ArrowMetadataReader (line 1586) | struct ArrowMetadataReader
  type ArrowMetadataReader (line 1590) | struct ArrowMetadataReader
  type ArrowStringView (line 1591) | struct ArrowStringView
  type ArrowStringView (line 1592) | struct ArrowStringView
  type ArrowStringView (line 1598) | struct ArrowStringView
  type ArrowStringView (line 1604) | struct ArrowStringView
  type ArrowStringView (line 1605) | struct ArrowStringView
  type ArrowBuffer (line 1611) | struct ArrowBuffer
  type ArrowBuffer (line 1615) | struct ArrowBuffer
  type ArrowStringView (line 1616) | struct ArrowStringView
  type ArrowStringView (line 1617) | struct ArrowStringView
  type ArrowBuffer (line 1624) | struct ArrowBuffer
  type ArrowStringView (line 1625) | struct ArrowStringView
  type ArrowStringView (line 1626) | struct ArrowStringView
  type ArrowBuffer (line 1629) | struct ArrowBuffer
  type ArrowStringView (line 1630) | struct ArrowStringView
  type ArrowSchemaView (line 1644) | struct ArrowSchemaView {
  type ArrowSchemaView (line 1728) | struct ArrowSchemaView
  type ArrowSchema (line 1729) | struct ArrowSchema
  type ArrowError (line 1730) | struct ArrowError
  type ArrowBuffer (line 1742) | struct ArrowBuffer
  type ArrowBuffer (line 1748) | struct ArrowBuffer
  type ArrowBufferAllocator (line 1748) | struct ArrowBufferAllocator
  type ArrowBuffer (line 1755) | struct ArrowBuffer
  type ArrowBuffer (line 1761) | struct ArrowBuffer
  type ArrowBuffer (line 1761) | struct ArrowBuffer
  type ArrowBuffer (line 1767) | struct ArrowBuffer
  type ArrowBuffer (line 1775) | struct ArrowBuffer
  type ArrowBuffer (line 1781) | struct ArrowBuffer
  type ArrowBuffer (line 1789) | struct ArrowBuffer
  type ArrowBuffer (line 1796) | struct ArrowBuffer
  type ArrowBuffer (line 1800) | struct ArrowBuffer
  type ArrowBuffer (line 1804) | struct ArrowBuffer
  type ArrowBuffer (line 1808) | struct ArrowBuffer
  type ArrowBuffer (line 1812) | struct ArrowBuffer
  type ArrowBuffer (line 1816) | struct ArrowBuffer
  type ArrowBuffer (line 1820) | struct ArrowBuffer
  type ArrowBuffer (line 1824) | struct ArrowBuffer
  type ArrowBuffer (line 1828) | struct ArrowBuffer
  type ArrowBuffer (line 1832) | struct ArrowBuffer
  type ArrowBuffer (line 1836) | struct ArrowBuffer
  type ArrowBuffer (line 1840) | struct ArrowBuffer
  type ArrowStringView (line 1841) | struct ArrowStringView
  type ArrowBuffer (line 1844) | struct ArrowBuffer
  type ArrowBufferView (line 1845) | struct ArrowBufferView
  type ArrowBitmap (line 1883) | struct ArrowBitmap
  type ArrowBitmap (line 1889) | struct ArrowBitmap
  type ArrowBitmap (line 1889) | struct ArrowBitmap
  type ArrowBitmap (line 1895) | struct ArrowBitmap
  type ArrowBitmap (line 1902) | struct ArrowBitmap
  type ArrowBitmap (line 1906) | struct ArrowBitmap
  type ArrowBitmap (line 1910) | struct ArrowBitmap
  type ArrowBitmap (line 1916) | struct ArrowBitmap
  type ArrowBitmap (line 1922) | struct ArrowBitmap
  type ArrowBitmap (line 1928) | struct ArrowBitmap
  type ArrowArray (line 1946) | struct ArrowArray
  type ArrowType (line 1947) | enum ArrowType
  type ArrowArray (line 1953) | struct ArrowArray
  type ArrowSchema (line 1954) | struct ArrowSchema
  type ArrowError (line 1955) | struct ArrowError
  type ArrowArray (line 1962) | struct ArrowArray
  type ArrowArrayView (line 1962) | struct ArrowArrayView
  type ArrowError (line 1963) | struct ArrowError
  type ArrowArray (line 1971) | struct ArrowArray
  type ArrowArray (line 1980) | struct ArrowArray
  type ArrowArray (line 1985) | struct ArrowArray
  type ArrowBitmap (line 1986) | struct ArrowBitmap
  type ArrowArray (line 1991) | struct ArrowArray
  type ArrowBuffer (line 1992) | struct ArrowBuffer
  type ArrowArray (line 1997) | struct ArrowArray
  type ArrowBitmap (line 2003) | struct ArrowBitmap
  type ArrowArray (line 2003) | struct ArrowArray
  type ArrowBuffer (line 2008) | struct ArrowBuffer
  type ArrowArray (line 2008) | struct ArrowArray
  type ArrowArray (line 2016) | struct ArrowArray
  type ArrowArray (line 2024) | struct ArrowArray
  type ArrowArray (line 2028) | struct ArrowArray
  type ArrowArray (line 2031) | struct ArrowArray
  type ArrowArray (line 2038) | struct ArrowArray
  type ArrowArray (line 2045) | struct ArrowArray
  type ArrowArray (line 2054) | struct ArrowArray
  type ArrowArray (line 2065) | struct ArrowArray
  type ArrowBufferView (line 2066) | struct ArrowBufferView
  type ArrowArray (line 2075) | struct ArrowArray
  type ArrowStringView (line 2076) | struct ArrowStringView
  type ArrowArray (line 2082) | struct ArrowArray
  type ArrowInterval (line 2083) | struct ArrowInterval
  type ArrowArray (line 2089) | struct ArrowArray
  type ArrowDecimal (line 2090) | struct ArrowDecimal
  type ArrowArray (line 2100) | struct ArrowArray
  type ArrowArray (line 2108) | struct ArrowArray
  type ArrowArray (line 2115) | struct ArrowArray
  type ArrowArray (line 2123) | struct ArrowArray
  type ArrowError (line 2124) | struct ArrowError
  type ArrowArray (line 2134) | struct ArrowArray
  type ArrowValidationLevel (line 2134) | enum ArrowValidationLevel
  type ArrowError (line 2135) | struct ArrowError
  type ArrowArrayView (line 2146) | struct ArrowArrayView
  type ArrowType (line 2147) | enum ArrowType
  type ArrowArrayView (line 2153) | struct ArrowArrayView
  type ArrowArrayView (line 2154) | struct ArrowArrayView
  type ArrowArrayView (line 2158) | struct ArrowArrayView
  type ArrowSchema (line 2159) | struct ArrowSchema
  type ArrowError (line 2159) | struct ArrowError
  type ArrowArrayView (line 2165) | struct ArrowArrayView
  type ArrowArrayView (line 2169) | struct ArrowArrayView
  type ArrowArrayView (line 2172) | struct ArrowArrayView
  type ArrowArrayView (line 2176) | struct ArrowArrayView
  type ArrowArray (line 2177) | struct ArrowArray
  type ArrowError (line 2178) | struct ArrowError
  type ArrowArrayView (line 2183) | struct ArrowArrayView
  type ArrowArray (line 2184) | struct ArrowArray
  type ArrowError (line 2184) | struct ArrowError
  type ArrowArrayView (line 2192) | struct ArrowArrayView
  type ArrowBufferView (line 2198) | struct ArrowBufferView
  type ArrowArrayView (line 2199) | struct ArrowArrayView
  type ArrowBufferType (line 2207) | enum ArrowBufferType
  type ArrowArrayView (line 2208) | struct ArrowArrayView
  type ArrowType (line 2216) | enum ArrowType
  type ArrowArrayView (line 2217) | struct ArrowArrayView
  type ArrowArrayView (line 2226) | struct ArrowArrayView
  type ArrowArrayView (line 2237) | struct ArrowArrayView
  type ArrowValidationLevel (line 2237) | enum ArrowValidationLevel
  type ArrowError (line 2238) | struct ArrowError
  type ArrowArrayView (line 2248) | struct ArrowArrayView
  type ArrowArrayView (line 2249) | struct ArrowArrayView
  type ArrowCompareLevel (line 2250) | enum ArrowCompareLevel
  type ArrowError (line 2251) | struct ArrowError
  type ArrowArrayView (line 2254) | struct ArrowArrayView
  type ArrowArrayView (line 2257) | struct ArrowArrayView
  type ArrowArrayView (line 2262) | struct ArrowArrayView
  type ArrowArrayView (line 2265) | struct ArrowArrayView
  type ArrowArrayView (line 2270) | struct ArrowArrayView
  type ArrowArrayView (line 2274) | struct ArrowArrayView
  type ArrowArrayView (line 2280) | struct ArrowArrayView
  type ArrowArrayView (line 2288) | struct ArrowArrayView
  type ArrowArrayView (line 2295) | struct ArrowArrayView
  type ArrowStringView (line 2300) | struct ArrowStringView
  type ArrowArrayView (line 2301) | struct ArrowArrayView
  type ArrowBufferView (line 2306) | struct ArrowBufferView
  type ArrowArrayView (line 2307) | struct ArrowArrayView
  type ArrowArrayView (line 2314) | struct ArrowArrayView
  type ArrowDecimal (line 2315) | struct ArrowDecimal
  type ArrowArrayStream (line 2334) | struct ArrowArrayStream
  type ArrowSchema (line 2334) | struct ArrowSchema
  type ArrowArrayStream (line 2343) | struct ArrowArrayStream
  type ArrowArray (line 2344) | struct ArrowArray
  type ArrowArrayStream (line 2352) | struct ArrowArrayStream
  type ArrowError (line 2352) | struct ArrowError
  function ArrowResolveChunk64 (line 2402) | static inline int64_t ArrowResolveChunk64(int64_t index, const int64_t* ...
  function ArrowResolveChunk32 (line 2423) | static inline int64_t ArrowResolveChunk32(int32_t index, const int32_t* ...
  function _ArrowGrowByFactor (line 2444) | static inline int64_t _ArrowGrowByFactor(int64_t current_capacity, int64...
  function ArrowFloatToHalfFloat (line 2455) | static inline uint16_t ArrowFloatToHalfFloat(float value) {
  function ArrowHalfFloatToFloat (line 2484) | static inline float ArrowHalfFloatToFloat(uint16_t value) {
  function ArrowBufferInit (line 2504) | static inline void ArrowBufferInit(struct ArrowBuffer* buffer) {
  function ArrowErrorCode (line 2511) | static inline ArrowErrorCode ArrowBufferSetAllocator(
  function ArrowBufferReset (line 2523) | static inline void ArrowBufferReset(struct ArrowBuffer* buffer) {
  function ArrowBufferMove (line 2529) | static inline void ArrowBufferMove(struct ArrowBuffer* src, struct Arrow...
  function ArrowErrorCode (line 2535) | static inline ArrowErrorCode ArrowBufferResize(struct ArrowBuffer* buffer,
  function ArrowErrorCode (line 2562) | static inline ArrowErrorCode ArrowBufferReserve(struct ArrowBuffer* buffer,
  function ArrowBufferAppendUnsafe (line 2584) | static inline void ArrowBufferAppendUnsafe(struct ArrowBuffer* buffer, c...
  function ArrowErrorCode (line 2593) | static inline ArrowErrorCode ArrowBufferAppend(struct ArrowBuffer* buffer,
  function ArrowErrorCode (line 2601) | static inline ArrowErrorCode ArrowBufferAppendInt8(struct ArrowBuffer* b...
  function ArrowErrorCode (line 2606) | static inline ArrowErrorCode ArrowBufferAppendUInt8(struct ArrowBuffer* ...
  function ArrowErrorCode (line 2611) | static inline ArrowErrorCode ArrowBufferAppendInt16(struct ArrowBuffer* ...
  function ArrowErrorCode (line 2616) | static inline ArrowErrorCode ArrowBufferAppendUInt16(struct ArrowBuffer*...
  function ArrowErrorCode (line 2621) | static inline ArrowErrorCode ArrowBufferAppendInt32(struct ArrowBuffer* ...
  function ArrowErrorCode (line 2626) | static inline ArrowErrorCode ArrowBufferAppendUInt32(struct ArrowBuffer*...
  function ArrowErrorCode (line 2631) | static inline ArrowErrorCode ArrowBufferAppendInt64(struct ArrowBuffer* ...
  function ArrowErrorCode (line 2636) | static inline ArrowErrorCode ArrowBufferAppendUInt64(struct ArrowBuffer*...
  function ArrowErrorCode (line 2641) | static inline ArrowErrorCode ArrowBufferAppendDouble(struct ArrowBuffer*...
  function ArrowErrorCode (line 2646) | static inline ArrowErrorCode ArrowBufferAppendFloat(struct ArrowBuffer* ...
  function ArrowErrorCode (line 2651) | static inline ArrowErrorCode ArrowBufferAppendStringView(struct ArrowBuf...
  function ArrowErrorCode (line 2656) | static inline ArrowErrorCode ArrowBufferAppendBufferView(struct ArrowBuf...
  function ArrowErrorCode (line 2661) | static inline ArrowErrorCode ArrowBufferAppendFill(struct ArrowBuffer* b...
  function _ArrowRoundUpToMultipleOf8 (line 2692) | static inline int64_t _ArrowRoundUpToMultipleOf8(int64_t value) {
  function _ArrowRoundDownToMultipleOf8 (line 2696) | static inline int64_t _ArrowRoundDownToMultipleOf8(int64_t value) {
  function _ArrowBytesForBits (line 2700) | static inline int64_t _ArrowBytesForBits(int64_t bits) {
  function _ArrowBitsUnpackInt8 (line 2704) | static inline void _ArrowBitsUnpackInt8(const uint8_t word, int8_t* out) {
  function _ArrowBitsUnpackInt32 (line 2715) | static inline void _ArrowBitsUnpackInt32(const uint8_t word, int32_t* ou...
  function _ArrowBitmapPackInt8 (line 2726) | static inline void _ArrowBitmapPackInt8(const int8_t* values, uint8_t* o...
  function _ArrowBitmapPackInt32 (line 2733) | static inline void _ArrowBitmapPackInt32(const int32_t* values, uint8_t*...
  function ArrowBitGet (line 2740) | static inline int8_t ArrowBitGet(const uint8_t* bits, int64_t i) {
  function ArrowBitsUnpackInt8 (line 2744) | static inline void ArrowBitsUnpackInt8(const uint8_t* bits, int64_t star...
  function ArrowBitsUnpackInt32 (line 2783) | static inline void ArrowBitsUnpackInt32(const uint8_t* bits, int64_t sta...
  function ArrowBitSet (line 2824) | static inline void ArrowBitSet(uint8_t* bits, int64_t i) {
  function ArrowBitClear (line 2828) | static inline void ArrowBitClear(uint8_t* bits, int64_t i) {
  function ArrowBitSetTo (line 2832) | static inline void ArrowBitSetTo(uint8_t* bits, int64_t i, uint8_t bit_i...
  function ArrowBitsSetTo (line 2837) | static inline void ArrowBitsSetTo(uint8_t* bits, int64_t start_offset, i...
  function ArrowBitCountSet (line 2882) | static inline int64_t ArrowBitCountSet(const uint8_t* bits, int64_t star...
  function ArrowBitmapInit (line 2927) | static inline void ArrowBitmapInit(struct ArrowBitmap* bitmap) {
  function ArrowBitmapMove (line 2932) | static inline void ArrowBitmapMove(struct ArrowBitmap* src, struct Arrow...
  function ArrowErrorCode (line 2938) | static inline ArrowErrorCode ArrowBitmapReserve(struct ArrowBitmap* bitmap,
  function ArrowErrorCode (line 2961) | static inline ArrowErrorCode ArrowBitmapResize(struct ArrowBitmap* bitmap,
  function ArrowErrorCode (line 2976) | static inline ArrowErrorCode ArrowBitmapAppend(struct ArrowBitmap* bitmap,
  function ArrowBitmapAppendUnsafe (line 2984) | static inline void ArrowBitmapAppendUnsafe(struct ArrowBitmap* bitmap,
  function ArrowBitmapAppendInt8Unsafe (line 2991) | static inline void ArrowBitmapAppendInt8Unsafe(struct ArrowBitmap* bitmap,
  function ArrowBitmapAppendInt32Unsafe (line 3041) | static inline void ArrowBitmapAppendInt32Unsafe(struct ArrowBitmap* bitmap,
  function ArrowBitmapReset (line 3091) | static inline void ArrowBitmapReset(struct ArrowBitmap* bitmap) {
  type ArrowBitmap (line 3134) | struct ArrowBitmap
  type ArrowArray (line 3134) | struct ArrowArray
  type ArrowArrayPrivateData (line 3135) | struct ArrowArrayPrivateData
  type ArrowArrayPrivateData (line 3136) | struct ArrowArrayPrivateData
  type ArrowBuffer (line 3140) | struct ArrowBuffer
  type ArrowArray (line 3140) | struct ArrowArray
  type ArrowArrayPrivateData (line 3141) | struct ArrowArrayPrivateData
  type ArrowArrayPrivateData (line 3142) | struct ArrowArrayPrivateData
  function _ArrowArrayUnionChildIndex (line 3171) | static inline int8_t _ArrowArrayUnionChildIndex(struct ArrowArray* array,
  function _ArrowArrayUnionTypeId (line 3177) | static inline int8_t _ArrowArrayUnionTypeId(struct ArrowArray* array,
  function _ArrowParseUnionTypeIds (line 3183) | static inline int32_t _ArrowParseUnionTypeIds(const char* type_ids, int8...
  function _ArrowParsedUnionTypeIdsWillEqualChildIndices (line 3216) | static inline int8_t _ArrowParsedUnionTypeIdsWillEqualChildIndices(const...
  function _ArrowUnionTypeIdsWillEqualChildIndices (line 3232) | static inline int8_t _ArrowUnionTypeIdsWillEqualChildIndices(const char*...
  function ArrowErrorCode (line 3239) | static inline ArrowErrorCode ArrowArrayStartAppending(struct ArrowArray*...
  function ArrowErrorCode (line 3284) | static inline ArrowErrorCode ArrowArrayShrinkToFit(struct ArrowArray* ar...
  function ArrowErrorCode (line 3301) | static inline ArrowErrorCode _ArrowArrayAppendBits(struct ArrowArray* ar...
  function ArrowErrorCode (line 3320) | static inline ArrowErrorCode _ArrowArrayAppendEmptyInternal(struct Arrow...
  function ArrowErrorCode (line 3465) | static inline ArrowErrorCode ArrowArrayAppendNull(struct ArrowArray* arr...
  function ArrowErrorCode (line 3469) | static inline ArrowErrorCode ArrowArrayAppendEmpty(struct ArrowArray* ar...
  function ArrowErrorCode (line 3473) | static inline ArrowErrorCode ArrowArrayAppendInt(struct ArrowArray* array,
  function ArrowErrorCode (line 3527) | static inline ArrowErrorCode ArrowArrayAppendUInt(struct ArrowArray* array,
  function ArrowErrorCode (line 3581) | static inline ArrowErrorCode ArrowArrayAppendDouble(struct ArrowArray* a...
  type ArrowBinaryViewInlined (line 3621) | struct ArrowBinaryViewInlined {
  type ArrowBinaryViewRef (line 3626) | struct ArrowBinaryViewRef {
  type ArrowBinaryViewInlined (line 3634) | struct ArrowBinaryViewInlined
  type ArrowBinaryViewRef (line 3635) | struct ArrowBinaryViewRef
  function ArrowArrayVariadicBufferCount (line 3639) | static inline int32_t ArrowArrayVariadicBufferCount(struct ArrowArray* a...
  function ArrowErrorCode (line 3646) | static inline ArrowErrorCode ArrowArrayAddVariadicBuffers(struct ArrowAr...
  function ArrowErrorCode (line 3680) | static inline ArrowErrorCode ArrowArrayAppendBytes(struct ArrowArray* ar...
  function ArrowErrorCode (line 3770) | static inline ArrowErrorCode ArrowArrayAppendString(struct ArrowArray* a...
  function ArrowErrorCode (line 3792) | static inline ArrowErrorCode ArrowArrayAppendInterval(struct ArrowArray*...
  function ArrowErrorCode (line 3839) | static inline ArrowErrorCode ArrowArrayAppendDecimal(struct ArrowArray* ...
  function ArrowErrorCode (line 3890) | static inline ArrowErrorCode ArrowArrayFinishElement(struct ArrowArray* ...
  function ArrowErrorCode (line 3964) | static inline ArrowErrorCode ArrowArrayFinishUnionElement(struct ArrowAr...
  function ArrowArrayViewMove (line 4008) | static inline void ArrowArrayViewMove(struct ArrowArrayView* src,
  function ArrowArrayViewGetNumBuffers (line 4014) | static inline int64_t ArrowArrayViewGetNumBuffers(struct ArrowArrayView*...
  function ArrowArrayViewGetBufferView (line 4035) | static inline struct ArrowBufferView ArrowArrayViewGetBufferView(
  function ArrowArrayViewGetBufferType (line 4069) | enum ArrowBufferType ArrowArrayViewGetBufferType(struct ArrowArrayView* ...
  function ArrowArrayViewGetBufferDataType (line 4092) | static inline enum ArrowType ArrowArrayViewGetBufferDataType(
  function ArrowArrayViewGetBufferElementSizeBits (line 4117) | static inline int64_t ArrowArrayViewGetBufferElementSizeBits(
  function ArrowArrayViewIsNull (line 4140) | static inline int8_t ArrowArrayViewIsNull(const struct ArrowArrayView* a...
  function ArrowArrayViewComputeNullCount (line 4156) | static inline int64_t ArrowArrayViewComputeNullCount(
  function ArrowArrayViewUnionTypeId (line 4181) | static inline int8_t ArrowArrayViewUnionTypeId(const struct ArrowArrayVi...
  function ArrowArrayViewUnionChildIndex (line 4192) | static inline int8_t ArrowArrayViewUnionChildIndex(
  function ArrowArrayViewUnionChildOffset (line 4202) | static inline int64_t ArrowArrayViewUnionChildOffset(
  function ArrowArrayViewListChildOffset (line 4214) | static inline int64_t ArrowArrayViewListChildOffset(
  function ArrowArrayViewGetBytesFromViewArrayUnsafe (line 4229) | static struct ArrowBufferView ArrowArrayViewGetBytesFromViewArrayUnsafe(
  function ArrowArrayViewGetIntUnsafe (line 4243) | static inline int64_t ArrowArrayViewGetIntUnsafe(const struct ArrowArray...
  function ArrowArrayViewGetUIntUnsafe (line 4278) | static inline uint64_t ArrowArrayViewGetUIntUnsafe(
  function ArrowArrayViewGetDoubleUnsafe (line 4313) | static inline double ArrowArrayViewGetDoubleUnsafe(
  function ArrowArrayViewGetStringUnsafe (line 4347) | static inline struct ArrowStringView ArrowArrayViewGetStringUnsafe(
  function ArrowArrayViewGetBytesUnsafe (line 4388) | static inline struct ArrowBufferView ArrowArrayViewGetBytesUnsafe(
  function ArrowArrayViewGetIntervalUnsafe (line 4426) | static inline void ArrowArrayViewGetIntervalUnsafe(
  function ArrowArrayViewGetDecimalUnsafe (line 4455) | static inline void ArrowArrayViewGetDecimalUnsafe(const struct ArrowArra...

FILE: data/lang/cpp/pool.cpp
  function interweave_strings (line 60) | std::string interweave_strings(const std::vector<std::string>& first, co...
  type ShmEntry (line 88) | struct ShmEntry { absptr_t ptr; Schema* schema; }
  function _flush_shm_tracker (line 91) | static void _flush_shm_tracker() {
  function Schema (line 109) | Schema* get_cached_schema(const char* schema_str) {
  function T (line 179) | T _get_value(const uint8_t* packet, const std::string& schema_str){
  function _mlc_hash (line 244) | std::string _mlc_hash(const T& value, const std::string& schema_str) {
  function _mlc_save (line 260) | void _mlc_save(const T& value, const std::string& schema_str, const std:...
  function _mlc_save_voidstar (line 273) | void _mlc_save_voidstar(const T& value, const std::string& schema_str, c...
  function _mlc_save_json (line 286) | void _mlc_save_json(const T& value, const std::string& schema_str, const...
  function _mlc_show (line 299) | std::string _mlc_show(const T& value, const std::string& schema_str) {
  function _mlc_read (line 316) | std::optional<T> _mlc_read(const std::string& schema_str, const std::str...
  function _mlc_load (line 335) | std::optional<T> _mlc_load(const std::string& schema_str, const std::str...
  function main (line 463) | int main(int argc, char* argv[]) {

FILE: data/lang/julia/juliabridge.c
  function clear_err (line 18) | static void clear_err(void) {
  function jlmorloc_close_daemon (line 42) | void jlmorloc_close_daemon(void* daemon) {
  function jlmorloc_wait_for_client (line 47) | int jlmorloc_wait_for_client(void* daemon) {
  function jlmorloc_send_packet (line 68) | int jlmorloc_send_packet(int client_fd, uint8_t* packet) {
  function jlmorloc_close_socket (line 74) | void jlmorloc_close_socket(int fd) {
  function jlmorloc_is_ping (line 80) | int jlmorloc_is_ping(const uint8_t* packet) {
  function jlmorloc_is_local_call (line 85) | int jlmorloc_is_local_call(const uint8_t* packet) {
  function jlmorloc_is_remote_call (line 90) | int jlmorloc_is_remote_call(const uint8_t* packet) {
  function jlmorloc_free_call (line 122) | void jlmorloc_free_call(void* call_ptr) {
  function jlmorloc_shinit (line 188) | int jlmorloc_shinit(const char* basename, int volume, size_t size) {
  function jlmorloc_set_fallback_dir (line 193) | void jlmorloc_set_fallback_dir(const char* dir) {

FILE: data/lang/py/pool.py
  function _init_worker_tracking (line 35) | def _init_worker_tracking(busy, total, wakeup_fd):
  function _tracked_foreign_call (line 42) | def _tracked_foreign_call(*args):
  function run_job (line 64) | def run_job(client_fd: int) -> None:
  function _send_fd (line 116) | def _send_fd(sock, fd):
  function _recv_fd (line 122) | def _recv_fd(sock):
  function worker_process (line 138) | def worker_process(job_fd, tmpdir, shm_basename, shutdown_flag, busy_cou...
  function signal_handler (line 187) | def signal_handler(sig, frame):
  function client_listener (line 213) | def client_listener(job_fd, socket_path, tmpdir, shm_basename, shutdown_...

FILE: data/lang/py/pymorloc.c
  type shm_entry_t (line 16) | typedef struct {
  function shm_tracker_push (line 24) | static void shm_tracker_push(absptr_t ptr, Schema* schema) {
  function flush_shm_tracker (line 37) | static void flush_shm_tracker(void) {
  function schema_to_npy_type (line 138) | static int schema_to_npy_type(morloc_serial_type type) {
  function PyObject (line 155) | PyObject* fromAnything(const Schema* schema, const void* data, const voi...
  function get_shm_size (line 432) | ssize_t get_shm_size(const Schema* schema, PyObject* obj) {
  function to_voidstar_r (line 606) | int to_voidstar_r(void* dest, void** cursor, const Schema* schema, PyObj...
  function PyObject (line 902) | static PyObject* pybinding__wait_for_client(PyObject* self, PyObject* ar...
  function PyObject (line 919) | static PyObject* pybinding__start_daemon(PyObject* self, PyObject* args)...
  function PyObject (line 946) | static PyObject* pybinding__close_daemon(PyObject* self, PyObject* args) {
  function PyObject (line 966) | static PyObject*  pybinding__read_morloc_call_packet(PyObject* self, PyO...
  function PyObject (line 1011) | static PyObject*  pybinding__send_packet_to_foreign_server(PyObject* sel...
  function PyObject (line 1029) | static PyObject*  pybinding__stream_from_client(PyObject* self, PyObject...
  function PyObject (line 1054) | static PyObject*  pybinding__close_socket(PyObject* self, PyObject* args){
  function PyObject (line 1070) | static PyObject* pybinding__put_value(PyObject* self, PyObject* args){ M...
  function PyObject (line 1191) | static PyObject* pybinding__get_value(PyObject* self, PyObject* args){ M...
  function PyObject (line 1306) | static PyObject* pybinding__flush_shm_tracker(PyObject* self, PyObject* ...
  function PyObject (line 1319) | static PyObject* pybinding__foreign_call(PyObject* self, PyObject* args)...
  function PyObject (line 1403) | static PyObject* pybinding__remote_call(PyObject* self, PyObject* args) ...
  function PyObject (line 1473) | static PyObject* pybinding__is_ping(PyObject* self, PyObject* args) { MA...
  function PyObject (line 1492) | static PyObject* pybinding__is_local_call(PyObject* self, PyObject* args...
  function PyObject (line 1510) | static PyObject* pybinding__is_remote_call(PyObject* self, PyObject* arg...
  function PyObject (line 1529) | static PyObject* pybinding__pong(PyObject* self, PyObject* args) { MAYFAIL
  function PyObject (line 1553) | static PyObject* pybinding__set_fallback_dir(PyObject* self, PyObject* a...
  function PyObject (line 1562) | static PyObject* pybinding__shinit(PyObject* self, PyObject* args) { MAY...
  function PyObject (line 1588) | static PyObject* pybinding__make_fail_packetg(PyObject* self, PyObject* ...
  function PyObject (line 1611) | static PyObject* pybinding__mlc_hash(PyObject* self, PyObject* args) { M...
  function PyObject (line 1653) | static PyObject* pybinding__mlc_save(PyObject* self, PyObject* args) { M...
  function PyObject (line 1689) | static PyObject* pybinding__mlc_save_voidstar(PyObject* self, PyObject* ...
  function PyObject (line 1725) | static PyObject* pybinding__mlc_save_json(PyObject* self, PyObject* args...
  function PyObject (line 1761) | static PyObject* pybinding__mlc_show(PyObject* self, PyObject* args) { M...
  function PyObject (line 1803) | static PyObject* pybinding__mlc_read(PyObject* self, PyObject* args) { M...
  function PyObject (line 1848) | static PyObject* pybinding__mlc_load(PyObject* self, PyObject* args) { M...
  type PyModuleDef (line 1917) | struct PyModuleDef
  function PyMODINIT_FUNC (line 1925) | PyMODINIT_FUNC PyInit_pymorloc(void) {

FILE: data/lang/r/rmorloc.c
  function get_shm_size (line 44) | static size_t get_shm_size(const Schema* schema, SEXP obj) {
  function MAYFAIL (line 226) | MAYFAIL
  function SEXP (line 608) | static SEXP from_voidstar(const void* data, const Schema* schema, const ...
  function daemon_finalizer (line 1050) | static void daemon_finalizer(SEXP ptr) {
  function SEXP (line 1067) | SEXP morloc_detach_daemon(SEXP daemon_r) {
  function SEXP (line 1088) | SEXP morloc_start_daemon(
  function SEXP (line 1126) | SEXP morloc_shinit(SEXP shm_basename_r, SEXP volume_index_r, SEXP shm_si...
  function r_sigterm_handler (line 1141) | static void r_sigterm_handler(int sig) {
  function SEXP (line 1146) | SEXP morloc_install_sigterm_handler(void) {
  function SEXP (line 1155) | SEXP morloc_is_shutting_down(void) {
  function SEXP (line 1159) | SEXP morloc_set_line_buffered(void) {
  function SEXP (line 1168) | SEXP morloc_wait_for_client(SEXP daemon_r){ MAYFAIL
  function SEXP (line 1244) | SEXP morloc_read_morloc_call_packet(SEXP packet_r) { MAYFAIL
  function SEXP (line 1278) | SEXP morloc_send_packet_to_foreign_server(SEXP client_fd_r, SEXP packet_...
  function SEXP (line 1303) | SEXP morloc_stream_from_client(SEXP client_fd_r) { MAYFAIL
  function SEXP (line 1327) | SEXP morloc_close_socket(SEXP socket_id_r) {
  function SEXP (line 1339) | SEXP morloc_put_value(SEXP obj_r, SEXP schema_str_r) { MAYFAIL
  function SEXP (line 1432) | SEXP morloc_mlc_show(SEXP obj_r, SEXP schema_str_r) { MAYFAIL
  function SEXP (line 1463) | SEXP morloc_get_value(SEXP packet_r, SEXP schema_str_r) { MAYFAIL
  function SEXP (line 1554) | SEXP morloc_foreign_call(SEXP socket_path_r, SEXP mid_r, SEXP args_r) { ...
  function SEXP (line 1613) | SEXP morloc_is_ping(SEXP packet_r) { MAYFAIL
  function SEXP (line 1624) | SEXP morloc_is_local_call(SEXP packet_r) { MAYFAIL
  function SEXP (line 1635) | SEXP morloc_is_remote_call(SEXP packet_r) { MAYFAIL
  function SEXP (line 1646) | SEXP morloc_pong(SEXP packet_r) { MAYFAIL
  function SEXP (line 1665) | SEXP morloc_make_fail_packet(SEXP failure_message_r) { MAYFAIL
  function SEXP (line 1680) | SEXP extract_element_by_name(SEXP list, const char* key) {
  function SEXP (line 1701) | SEXP morloc_remote_call(SEXP midx, SEXP socket_path, SEXP cache_path, SE...
  function SEXP (line 1772) | SEXP morloc_socketpair(void) {
  function SEXP (line 1784) | SEXP morloc_fork(void) {
  function SEXP (line 1796) | SEXP morloc_exit(SEXP status_r) {
  function SEXP (line 1802) | SEXP morloc_send_fd(SEXP pipe_fd_r, SEXP client_fd_r) {
  function SEXP (line 1831) | SEXP morloc_recv_fd(SEXP pipe_fd_r) {
  function SEXP (line 1861) | SEXP morloc_kill(SEXP pid_r, SEXP sig_r) {
  function SEXP (line 1868) | SEXP morloc_waitpid(SEXP pid_r) {
  function SEXP (line 1875) | SEXP morloc_waitpid_blocking(SEXP pid_r) {
  function shared_counter_finalizer (line 1886) | static void shared_counter_finalizer(SEXP ptr) {
  function SEXP (line 1894) | SEXP morloc_shared_counter_create(void) {
  function SEXP (line 1908) | SEXP morloc_shared_counter_inc(SEXP ptr_r) {
  function SEXP (line 1915) | SEXP morloc_shared_counter_dec(SEXP ptr_r) {
  function SEXP (line 1922) | SEXP morloc_shared_counter_read(SEXP ptr_r) {
  function SEXP (line 1929) | SEXP morloc_pipe(void) {
  function SEXP (line 1941) | SEXP morloc_write_byte(SEXP fd_r, SEXP byte_r) {
  function SEXP (line 1948) | SEXP morloc_close_fd(SEXP fd_r) {
  function recv_fd_c (line 1959) | static int recv_fd_c(int pipe_fd) {
  function send_fail_to_client (line 1985) | static void send_fail_to_client(int client_fd, const char* msg) {
  function dispatch_manifold_c (line 1994) | static void dispatch_manifold_c(int client_fd, const uint8_t* packet,
  function run_job_c (line 2058) | static void run_job_c(int client_fd, SEXP dispatch, SEXP remote_dispatch) {
  function SEXP (line 2100) | SEXP morloc_worker_loop_c(SEXP pipe_fd_r, SEXP dispatch_r, SEXP remote_d...
  function R_init_rmorloc (line 2121) | void R_init_rmorloc(DllInfo *info) {

FILE: data/morloc/morloc.h
  type relptr_t (line 60) | typedef ssize_t relptr_t;
  type volptr_t (line 61) | typedef ssize_t volptr_t;
  type shm_t (line 74) | typedef struct shm_s {
  type block_header_t (line 89) | typedef struct block_header_s {
  type morloc_serial_type (line 99) | typedef enum {
  type Schema (line 134) | struct Schema
  type Schema (line 135) | typedef struct Schema {
  type Array (line 146) | typedef struct Array {
  type Tensor (line 152) | typedef struct Tensor {
  type command_type_t (line 167) | typedef uint8_t command_type_t;
  type packet_command_type_t (line 173) | typedef struct __attribute__((packed)) packet_command_type_s {
  type packet_command_call_t (line 181) | typedef struct __attribute__((packed)) packet_command_call_s {
  type packet_command_data_t (line 206) | typedef struct __attribute__((packed)) packet_command_data_s {
  type packet_command_ping_t (line 216) | typedef struct __attribute__((packed)) packet_command_ping_s {
  type morloc_packet_header_t (line 229) | typedef struct __attribute__((packed)) morloc_packet_header_s {
  type morloc_metadata_header_t (line 248) | typedef struct __attribute__((packed)) morloc_metadata_header_s {
  type argument_t (line 258) | typedef struct argument_s {
  type morloc_expression_type (line 265) | typedef enum {
  type morloc_app_expression_type (line 276) | typedef enum { APPLY_PATTERN, APPLY_LAMBDA, APPLY_FORMAT } morloc_app_ex...
  type morloc_pattern_type (line 278) | typedef enum { SELECT_BY_KEY, SELECT_BY_INDEX, SELECT_END } morloc_patte...
  type morloc_expression_t (line 281) | typedef struct morloc_expression_s morloc_expression_t;
  type morloc_app_expression_t (line 282) | typedef struct morloc_app_expression_s morloc_app_expression_t;
  type morloc_lam_expression_t (line 283) | typedef struct morloc_lam_expression_s morloc_lam_expression_t;
  type morloc_data_t (line 284) | typedef struct morloc_data_s morloc_data_t;
  type morloc_pattern_t (line 285) | typedef struct morloc_pattern_s morloc_pattern_t;
  type primitive_t (line 287) | typedef union primitive_u {
  type morloc_data_array_t (line 303) | typedef struct morloc_data_array_s {
  type morloc_data_t (line 309) | typedef struct morloc_data_s {
  type morloc_app_expression_t (line 319) | typedef struct morloc_app_expression_s {
  type morloc_lam_expression_t (line 330) | typedef struct morloc_lam_expression_s {
  type morloc_pattern_t (line 336) | typedef struct morloc_pattern_s {
  type morloc_expression_t (line 346) | typedef struct morloc_expression_s {
  type manifest_pool_t (line 364) | typedef struct {
  type manifest_arg_kind_t (line 370) | typedef enum {
  type manifest_arg_t (line 377) | typedef struct manifest_arg_s manifest_arg_t;
  type manifest_grp_entry_t (line 379) | typedef struct {
  type manifest_arg_s (line 384) | struct manifest_arg_s {
  type manifest_cmd_group_t (line 400) | typedef struct {
  type manifest_command_t (line 405) | typedef struct {
  type manifest_service_t (line 423) | typedef struct {
  type manifest_t (line 430) | typedef struct {
  type morloc_call_t (line 449) | typedef struct morloc_call_s {
  type client_list_t (line 456) | typedef struct client_list_s {
  type language_daemon_t (line 461) | typedef struct language_daemon_s {
  type morloc_socket_t (line 472) | typedef struct morloc_socket_s {
  type binding_entry_t (line 481) | typedef struct binding_entry_s {
  type binding_store_t (line 490) | typedef struct binding_store_s {
  type daemon_config_t (line 503) | typedef struct daemon_config_s {
  type daemon_method_t (line 513) | typedef enum {
  type daemon_request_t (line 524) | typedef struct daemon_request_s {
  type daemon_response_t (line 533) | typedef struct daemon_response_s {
  type http_method_t (line 542) | typedef enum {
  type http_request_t (line 549) | typedef struct http_request_s {
  type router_program_t (line 558) | typedef struct router_program_s {
  type router_t (line 566) | typedef struct router_s {
  type pool_concurrency_t (line 583) | typedef enum {
  type pool_config_t (line 589) | typedef struct {
  type pool_state_t (line 599) | typedef struct pool_state_s pool_state_t;
  type ArrowSchema (line 608) | struct ArrowSchema {
  type ArrowArray (line 620) | struct ArrowArray {
  type arrow_column_desc_t (line 639) | typedef struct arrow_column_desc {
  type arrow_shm_header_t (line 649) | typedef struct arrow_shm_header {
  type resources_t (line 662) | typedef struct resources_s {
  function schema_tensor_ndim (line 716) | static inline size_t schema_tensor_ndim(const Schema* schema) {
  type ArrowArray (line 856) | struct ArrowArray
  type ArrowSchema (line 856) | struct ArrowSchema
  type ArrowSchema (line 862) | struct ArrowSchema
  type ArrowArray (line 863) | struct ArrowArray

FILE: data/rust/morloc-manager/src/config.rs
  function config_dir (line 13) | pub fn config_dir(scope: Scope) -> PathBuf {
  function config_path (line 22) | pub fn config_path(scope: Scope) -> PathBuf {
  function data_dir (line 26) | pub fn data_dir(scope: Scope) -> PathBuf {
  function env_config_dir (line 37) | pub fn env_config_dir(scope: Scope, name: &str) -> PathBuf {
  function env_config_path (line 41) | pub fn env_config_path(scope: Scope, name: &str) -> PathBuf {
  function env_dockerfile_path (line 45) | pub fn env_dockerfile_path(scope: Scope, name: &str) -> PathBuf {
  function env_flags_path (line 49) | pub fn env_flags_path(scope: Scope, name: &str) -> PathBuf {
  function env_data_dir (line 53) | pub fn env_data_dir(scope: Scope, name: &str) -> PathBuf {
  function read_config (line 61) | pub fn read_config<T: serde::de::DeserializeOwned>(path: &Path) -> Resul...
  function read_active_config (line 75) | pub fn read_active_config() -> Option<Config> {
  function read_env_config (line 84) | pub fn read_env_config(scope: Scope, name: &str) -> Result<EnvironmentCo...
  function write_config (line 92) | pub fn write_config<T: serde::Serialize>(path: &Path, val: &T) -> Result...
  function write_env_config (line 121) | pub fn write_env_config(scope: Scope, name: &str, ec: &EnvironmentConfig...
  function find_env_scope (line 130) | pub fn find_env_scope(name: &str) -> Result<Scope> {
  function list_env_names (line 143) | pub fn list_env_names(scope: Scope) -> Vec<String> {
  function read_flags_file (line 163) | pub fn read_flags_file(path: &Path) -> Vec<String> {
  function shell_expand_line (line 178) | fn shell_expand_line(line: &str) -> Vec<String> {
  function read_flags_file_lines (line 201) | pub fn read_flags_file_lines(path: &Path) -> Vec<String> {
  function with_file_lock (line 217) | fn with_file_lock<F, T>(lock_path: &str, action: F) -> Result<T>
  function best_effort_chmod (line 262) | fn best_effort_chmod(path: &Path, mode: u32) {

FILE: data/rust/morloc-manager/src/container.rs
  type RunConfig (line 11) | pub struct RunConfig {
    method new (line 28) | pub fn new(image: &str) -> Self {
  type BuildConfig (line 48) | pub struct BuildConfig {
  function engine_executable (line 59) | pub fn engine_executable(engine: ContainerEngine) -> &'static str {
  function container_run (line 70) | pub fn container_run(engine: ContainerEngine, cfg: &RunConfig) -> (ExitS...
  function container_run_quiet (line 78) | pub fn container_run_quiet(engine: ContainerEngine, cfg: &RunConfig) -> ...
  function container_run_passthrough (line 85) | pub fn container_run_passthrough(
  function container_build (line 118) | pub fn container_build(engine: ContainerEngine, cfg: &BuildConfig) -> (E...
  function container_pull (line 124) | pub fn container_pull(engine: ContainerEngine, image: &str) -> (ExitStat...
  function container_build_visible (line 131) | pub fn container_build_visible(engine: ContainerEngine, cfg: &BuildConfi...
  function container_pull_visible (line 139) | pub fn container_pull_visible(engine: ContainerEngine, image: &str) -> E...
  function image_exists_locally (line 144) | pub fn image_exists_locally(engine: ContainerEngine, image: &str) -> bool {
  function image_inspect_stderr (line 157) | pub fn image_inspect_stderr(engine: ContainerEngine, image: &str) -> Opt...
  type RemoteImageStatus (line 172) | pub enum RemoteImageStatus {
  function check_remote_image (line 182) | pub fn check_remote_image(engine: ContainerEngine, image: &str) -> Remot...
  function container_stop (line 209) | pub fn container_stop(engine: ContainerEngine, name_or_id: &str) -> (Exi...
  function container_remove (line 215) | pub fn container_remove(engine: ContainerEngine, name_or_id: &str) -> Ex...
  function container_remove_quiet (line 222) | pub fn container_remove_quiet(engine: ContainerEngine, name_or_id: &str)...
  function container_exists (line 229) | pub fn container_exists(engine: ContainerEngine, name: &str) -> bool {
  function remove_image (line 240) | pub fn remove_image(engine: ContainerEngine, tag: &str) -> bool {
  function build_run_args (line 250) | pub fn build_run_args(
  function engine_specific_run_flags_io (line 308) | pub fn engine_specific_run_flags_io(engine: ContainerEngine) -> Vec<Stri...
  function engine_specific_run_flags (line 331) | pub fn engine_specific_run_flags(engine: ContainerEngine) -> Vec<String> {
  function build_build_args (line 338) | pub fn build_build_args(cfg: &BuildConfig) -> Vec<String> {
  function run_process_to_stderr (line 361) | fn run_process_to_stderr(exe: &str, args: &[String]) -> ExitStatus {
  function run_process (line 385) | fn run_process(exe: &str, args: &[String]) -> (ExitStatus, String, Strin...
  function run_process_quiet (line 405) | fn run_process_quiet(exe: &str, args: &[String]) -> (ExitStatus, String,...
  function exit_code_to_int (line 425) | pub fn exit_code_to_int(status: ExitStatus) -> i32 {

FILE: data/rust/morloc-manager/src/doctor.rs
  constant MANIFEST_MARKER (line 11) | const MANIFEST_MARKER: &str = "### MANIFEST ###";
  type CheckResult (line 14) | pub struct CheckResult {
  type DoctorSummary (line 21) | pub struct DoctorSummary {
  type Counts (line 27) | struct Counts {
    method new (line 37) | fn new(json_mode: bool) -> Self {
    method set_category (line 41) | fn set_category(&mut self, cat: &str) {
    method pass (line 45) | fn pass(&mut self, msg: &str) {
    method warn (line 58) | fn warn(&mut self, msg: &str) {
    method fail (line 71) | fn fail(&mut self, msg: &str) {
    method skip (line 84) | fn skip(&mut self, msg: &str) {
  function doctor (line 97) | pub fn doctor(
  function check_engine (line 192) | fn check_engine(c: &mut Counts, engine: ContainerEngine) {
  function check_base_image (line 224) | fn check_base_image(c: &mut Counts, engine: ContainerEngine, base_image:...
  function check_built_image (line 235) | fn check_built_image(c: &mut Counts, engine: ContainerEngine, ec: &Envir...
  function check_data_dirs (line 267) | fn check_data_dirs(c: &mut Counts, data_dir: &Path) {
  function check_file_readability (line 289) | fn check_file_readability(c: &mut Counts, data_dir: &Path) {
  function collect_unreadable (line 315) | fn collect_unreadable(dir: &Path, out: &mut Vec<String>) {
  function check_manifests (line 330) | fn check_manifests(
  function check_one_manifest (line 366) | fn check_one_manifest(
  function check_morloc_version (line 465) | fn check_morloc_version(c: &mut Counts, engine: ContainerEngine, ec: &En...
  function check_programs_deep (line 489) | fn check_programs_deep(

FILE: data/rust/morloc-manager/src/environment.rs
  type ApplyOptions (line 25) | pub struct ApplyOptions {
  type EnvInfo (line 44) | pub struct EnvInfo {
  constant MORLOC_IMAGE_PREFIX (line 54) | const MORLOC_IMAGE_PREFIX: &str = "ghcr.io/morloc-project/morloc/morloc-...
  function cwd_access_hint (line 62) | fn cwd_access_hint(stderr: &str) -> Option<String> {
  function version_to_image (line 80) | pub fn version_to_image(ver: &Version) -> String {
  function pull_tagged_image (line 87) | pub fn pull_tagged_image(engine: ContainerEngine, tag: &str) -> Result<(...
  function resolve_latest (line 137) | pub fn resolve_latest(engine: ContainerEngine) -> Result<(String, Versio...
  function pull_version_image (line 142) | pub fn pull_version_image(engine: ContainerEngine, ver: &Version) -> Res...
  function detect_morloc_version (line 148) | pub fn detect_morloc_version(engine: ContainerEngine, image: &str) -> Re...
  function pull_custom_image (line 175) | pub fn pull_custom_image(engine: ContainerEngine, image: &str) -> Result...
  function validate_env_name (line 201) | pub fn validate_env_name(name: &str) -> Result<()> {
  function parse_include_spec (line 226) | fn parse_include_spec(spec: &str, cfg_dir: &Path) -> Result<(PathBuf, Pa...
  function apply_environment (line 273) | pub fn apply_environment(opts: &ApplyOptions) -> Result<()> {
  function remove_environment (line 514) | pub fn remove_environment(engine: ContainerEngine, scope: Scope, name: &...
  function list_environments (line 564) | pub fn list_environments(scope: Scope, active_env: Option<&str>) -> Vec<...
  function select_environment (line 580) | pub fn select_environment(name: &str, write_scope: Scope) -> Result<()> {
  function resolve_active_environment (line 597) | pub fn resolve_active_environment() -> Result<(String, Scope, Environmen...
  function resolve_active_env_name (line 610) | fn resolve_active_env_name() -> Result<String> {
  function is_valid_shm_size (line 650) | pub fn is_valid_shm_size(s: &str) -> bool {
  function hash_file (line 662) | fn hash_file(path: &Path) -> Result<String> {
  function hex_encode (line 670) | fn hex_encode(bytes: &[u8]) -> String {

FILE: data/rust/morloc-manager/src/error.rs
  type ManagerError (line 7) | pub enum ManagerError {
  method fmt (line 62) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  method fmt (line 68) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type Result (line 76) | pub type Result<T> = std::result::Result<T, ManagerError>;

FILE: data/rust/morloc-manager/src/freeze.rs
  function freeze_from_dir (line 11) | pub fn freeze_from_dir(
  function write_freeze_manifest (line 140) | pub fn write_freeze_manifest(path: &str, manifest: &FreezeManifest) -> R...
  function read_freeze_manifest (line 148) | pub fn read_freeze_manifest(path: &str) -> Result<FreezeManifest> {
  function scan_modules (line 159) | fn scan_modules(fdb_dir: &str) -> Vec<ModuleEntry> {
  function scan_programs (line 196) | fn scan_programs(fdb_dir: &str) -> Vec<ProgramEntry> {
  function parse_manifest_commands (line 223) | fn parse_manifest_commands(path: &Path) -> Vec<String> {
  function check_readable_recursive (line 243) | fn check_readable_recursive(dir: &Path) -> Result<()> {

FILE: data/rust/morloc-manager/src/main.rs
  function build_help_template (line 29) | fn build_help_template() -> String {
  type Cli (line 72) | struct Cli {
  type Cmd (line 90) | enum Cmd {
  type EngineArg (line 391) | enum EngineArg {
  method from (line 397) | fn from(e: EngineArg) -> Self {
  function parse_port (line 405) | fn parse_port(s: &str) -> std::result::Result<(u16, u16), String> {
  function collect_env_vars (line 420) | fn collect_env_vars(
  function main (line 461) | fn main() -> ExitCode {
  function resolve_scope (line 524) | fn resolve_scope(system: bool) -> Scope {
  function check_system_write_access (line 528) | fn check_system_write_access() -> Result<()> {
  function resolve_env_or_active (line 551) | fn resolve_env_or_active(name: Option<String>) -> Result<(String, Scope,...
  function ensure_engine (line 562) | fn ensure_engine() -> Result<ContainerEngine> {
  function which (line 569) | fn which(name: &str) -> bool {
  function display_engine (line 579) | fn display_engine(engine: ContainerEngine) -> &'static str {
  function bold_green (line 586) | fn bold_green(msg: &str) -> String {
  function check_docker_socket (line 594) | fn check_docker_socket(engine: ContainerEngine) {
  function require_docker_socket (line 610) | fn require_docker_socket(engine: ContainerEngine) -> Result<()> {
  function check_podman_additional_stores (line 632) | fn check_podman_additional_stores(engine: ContainerEngine) -> bool {
  function warn_podman_additional_stores (line 664) | fn warn_podman_additional_stores() {
  function dispatch (line 679) | fn dispatch(verbose: bool, json: bool, cmd: Cmd) -> Result<()> {
  function find_running_serve_container (line 1951) | fn find_running_serve_container() -> Result<(String, ContainerEngine)> {
  function run_in_container (line 1983) | fn run_in_container(
  function run_in_container_for (line 1992) | fn run_in_container_for(
  function run_with_config (line 2095) | fn run_with_config(
  function run_morloc_init_for (line 2182) | fn run_morloc_init_for(
  function normalize_trailing (line 2195) | fn normalize_trailing(p: &str) -> String {
  function show_version_formats_correctly (line 2215) | fn show_version_formats_correctly() {
  function parse_version_round_trips (line 2220) | fn parse_version_round_trips() {
  function parse_version_rejects_invalid (line 2225) | fn parse_version_rejects_invalid() {
  function parse_version_rejects_incomplete (line 2230) | fn parse_version_rejects_incomplete() {
  function version_ordering_is_semantic (line 2235) | fn version_ordering_is_semantic() {
  function version_ordering_minor (line 2240) | fn version_ordering_minor() {
  function version_equality (line 2245) | fn version_equality() {
  function parse_version_with_prerelease (line 2250) | fn parse_version_with_prerelease() {
  function prerelease_sorts_before_release (line 2264) | fn prerelease_sorts_before_release() {
  function invalid_version_renders (line 2273) | fn invalid_version_renders() {
  function no_command_renders (line 2279) | fn no_command_renders() {
  function no_active_environment_suggests_new (line 2285) | fn no_active_environment_suggests_new() {
  function config_permission_denied_mentions_permissions (line 2291) | fn config_permission_denied_mentions_permissions() {
  function freeze_error_renders (line 2297) | fn freeze_error_renders() {
  function default_config_has_no_active_env (line 2305) | fn default_config_has_no_active_env() {
  function default_config_uses_podman (line 2310) | fn default_config_uses_podman() {
  function config_json_round_trip (line 2317) | fn config_json_round_trip() {
  function config_read_missing_returns_not_found (line 2331) | fn config_read_missing_returns_not_found() {
  function config_read_invalid_json_returns_parse_error (line 2339) | fn config_read_invalid_json_returns_parse_error() {
  function env_config_json_round_trip (line 2348) | fn env_config_json_round_trip() {
  function freeze_manifest_json_round_trip (line 2370) | fn freeze_manifest_json_round_trip() {
  function freeze_manifest_reads_legacy_env_vars (line 2405) | fn freeze_manifest_reads_legacy_env_vars() {
  function read_flags_file_parses (line 2426) | fn read_flags_file_parses() {
  function read_flags_file_missing (line 2442) | fn read_flags_file_missing() {
  function read_flags_file_expands_env_vars (line 2449) | fn read_flags_file_expands_env_vars() {
  function read_flags_file_expands_tilde (line 2459) | fn read_flags_file_expands_tilde() {
  function engine_executable_docker (line 2471) | fn engine_executable_docker() {
  function engine_executable_podman (line 2476) | fn engine_executable_podman() {
  function build_run_args_minimal (line 2481) | fn build_run_args_minimal() {
  function build_run_args_podman_userns (line 2495) | fn build_run_args_podman_userns() {
  function build_run_args_interactive (line 2506) | fn build_run_args_interactive() {
  function build_run_args_selinux_suffix (line 2518) | fn build_run_args_selinux_suffix() {
  function build_run_args_workdir (line 2532) | fn build_run_args_workdir() {
  function build_run_args_read_only (line 2545) | fn build_run_args_read_only() {
  function build_run_args_command_at_end (line 2557) | fn build_run_args_command_at_end() {
  function build_build_args_includes_tag_and_dockerfile (line 2577) | fn build_build_args_includes_tag_and_dockerfile() {
  function root_is_unsafe (line 2595) | fn root_is_unsafe() {
  function tmp_is_unsafe (line 2600) | fn tmp_is_unsafe() {
  function tmp_subdir_is_unsafe (line 2605) | fn tmp_subdir_is_unsafe() {
  function home_subdir_is_safe (line 2610) | fn home_subdir_is_safe() {
  function var_tmp_is_unsafe (line 2615) | fn var_tmp_is_unsafe() {

FILE: data/rust/morloc-manager/src/selinux.rs
  type SELinuxMode (line 7) | pub enum SELinuxMode {
  function detect_selinux (line 13) | pub fn detect_selinux() -> SELinuxMode {
  function volume_suffix (line 32) | pub fn volume_suffix(mode: SELinuxMode) -> &'static str {
  function is_safe_to_relabel (line 39) | pub fn is_safe_to_relabel(path: &str) -> bool {
  function validate_mount_path (line 47) | pub fn validate_mount_path(path: &str) -> Result<()> {
  function is_unsafe_system_path (line 59) | fn is_unsafe_system_path(p: &str) -> bool {
  function normalize (line 64) | fn normalize(p: &str) -> String {
  function normalize_trailing (line 70) | fn normalize_trailing(p: &str) -> String {

FILE: data/rust/morloc-manager/src/serve.rs
  function build_serve_image (line 15) | pub fn build_serve_image(
  function run_serve_container (line 192) | pub fn run_serve_container(
  function serve_environment (line 280) | pub fn serve_environment(
  function stop_serve_container (line 406) | pub fn stop_serve_container(engine: ContainerEngine, verbose: bool, name...
  function serve_container_name (line 430) | pub fn serve_container_name(env_name: &str) -> String {
  function serve_container_prefix (line 438) | pub fn serve_container_prefix() -> String {
  function env_name_from_container (line 446) | pub fn env_name_from_container(container_name: &str) -> &str {
  type ServeContainerInfo (line 452) | pub struct ServeContainerInfo {
  function query_serve_containers (line 460) | pub fn query_serve_containers(engine: ContainerEngine, verbose: bool) ->...
  function find_running_serve_containers (line 509) | pub fn find_running_serve_containers(engine: ContainerEngine) -> Vec<Str...
  function validate_programs (line 538) | pub fn validate_programs(
  constant CONTAINER_MORLOC_HOME (line 589) | const CONTAINER_MORLOC_HOME: &str = "/opt/morloc";
  constant MANIFEST_MARKER (line 590) | const MANIFEST_MARKER: &str = "### MANIFEST ###";
  function rewrite_manifest_paths (line 595) | fn rewrite_manifest_paths(context_dir: &Path) -> Result<()> {
  function rewrite_one_manifest (line 619) | fn rewrite_one_manifest(path: &Path, new_build_path: &str) -> Result<()> {
  function resolve_base_from_manifest (line 660) | fn resolve_base_from_manifest(
  function rebuild_env_image (line 708) | fn rebuild_env_image(

FILE: data/rust/morloc-manager/src/types.rs
  type Scope (line 10) | pub enum Scope {
    method deserialize (line 25) | fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, ...
  method serialize (line 16) | fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Er...
  type ContainerEngine (line 36) | pub enum ContainerEngine {
    method deserialize (line 51) | fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, ...
  method serialize (line 42) | fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Er...
  type Version (line 68) | pub struct Version {
    method new (line 77) | pub fn new(major: u32, minor: u32, patch: u32) -> Self {
    method show (line 86) | pub fn show(&self) -> String {
    method deserialize (line 153) | fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, ...
  method cmp (line 95) | fn cmp(&self, other: &Self) -> Ordering {
  method partial_cmp (line 110) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  type Err (line 116) | type Err = String;
  method from_str (line 118) | fn from_str(s: &str) -> Result<Self, Self::Err> {
  method serialize (line 147) | fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Er...
  type Config (line 164) | pub struct Config {
  function default_engine (line 172) | fn default_engine() -> ContainerEngine {
  method default (line 177) | fn default() -> Self {
  type EnvironmentConfig (line 190) | pub struct EnvironmentConfig {
    method active_image (line 225) | pub fn active_image(&self) -> &str {
  function default_shm_size (line 218) | fn default_shm_size() -> String {
  type FreezeManifest (line 235) | pub struct FreezeManifest {
  type FrozenEnvLayer (line 250) | pub struct FrozenEnvLayer {
  type ModuleEntry (line 261) | pub struct ModuleEntry {
  type ProgramEntry (line 268) | pub struct ProgramEntry {

FILE: data/rust/morloc-manifest/src/lib.rs
  type Metadata (line 59) | pub type Metadata = BTreeMap<String, serde_json::Value>;
  type Manifest (line 67) | pub struct Manifest {
  type Build (line 107) | pub struct Build {
  type Pool (line 127) | pub struct Pool {
  type CmdType (line 147) | pub enum CmdType {
  type Command (line 157) | pub struct Command {
    method is_pure (line 226) | pub fn is_pure(&self) -> bool {
  type Return (line 236) | pub struct Return {
  type Constraint (line 299) | pub struct Constraint {
  type Arg (line 326) | pub enum Arg {
    method short_opt_char (line 576) | pub fn short_opt_char(&self) -> Option<char> {
    method long_opt_str (line 587) | pub fn long_opt_str(&self) -> Option<&str> {
    method is_flag (line 596) | pub fn is_flag(&self) -> bool {
    method is_quoted (line 604) | pub fn is_quoted(&self) -> bool {
    method default_val (line 614) | pub fn default_val(&self) -> Option<&str> {
    method metavar_str (line 624) | pub fn metavar_str(&self) -> Option<&str> {
    method desc_lines (line 635) | pub fn desc_lines(&self) -> &[String] {
    method type_desc_str (line 646) | pub fn type_desc_str(&self) -> Option<&str> {
    method schema_str (line 659) | pub fn schema_str(&self) -> Option<&str> {
    method constraints (line 672) | pub fn constraints(&self) -> &[Constraint] {
    method kind_constraint (line 685) | pub fn kind_constraint(&self) -> Option<&str> {
  type GroupOpt (line 465) | pub struct GroupOpt {
  type GroupEntry (line 478) | pub struct GroupEntry {
  type CmdGroup (line 491) | pub struct CmdGroup {
  type Service (line 507) | pub struct Service {
  function read_manifest_payload (line 528) | pub fn read_manifest_payload(path: &str) -> Result<String, String> {
  function parse_manifest (line 554) | pub fn parse_manifest(payload: &str) -> Result<Manifest, String> {
  function wrap (line 701) | fn wrap(commands_json: &str) -> String {
  function test_parse_simple_manifest (line 723) | fn test_parse_simple_manifest() {
  function test_parse_pure_command (line 774) | fn test_parse_pure_command() {
  function test_parse_kind_constraint (line 813) | fn test_parse_kind_constraint() {
  function test_version_mismatch_rejected (line 855) | fn test_version_mismatch_rejected() {

FILE: data/rust/morloc-nexus/build.rs
  function main (line 1) | fn main() {

FILE: data/rust/morloc-nexus/src/dispatch.rs
  type OutputFormat (line 19) | pub enum OutputFormat {
  type NexusConfig (line 28) | pub struct NexusConfig {
  method default (line 45) | fn default() -> Self {
  function die_with_pool_error (line 81) | fn die_with_pool_error(
  function parse_nexus_options (line 102) | pub fn parse_nexus_options(args: &[String], config: &mut NexusConfig) ->...
  function extract_global_options (line 215) | pub fn extract_global_options(args: &mut Vec<String>, config: &mut Nexus...
  function parse_output_format (line 286) | fn parse_output_format(s: &str) -> OutputFormat {
  function quoted (line 300) | pub fn quoted(s: &str) -> String {
  function dispatch (line 307) | pub fn dispatch(
  function dispatch_command (line 358) | pub fn dispatch_command(
  type ArgValue (line 391) | pub enum ArgValue {
  function parse_command_args (line 405) | fn parse_command_args(
  function run_remote_command (line 596) | fn run_remote_command(
  function print_result_c (line 849) | fn print_result_c(
  function print_result (line 976) | fn print_result(
  function run_pure_command (line 1030) | fn run_pure_command(cmd: &Command, args: &[ArgValue], config: &NexusConf...
  function unsafe_errmsg_to_string (line 1192) | fn unsafe_errmsg_to_string(errmsg: *mut std::ffi::c_char) -> String {
  function is_flag_opt (line 1204) | fn is_flag_opt(cmd: &Command, long_name: &str) -> bool {
  function is_rev_flag (line 1215) | fn is_rev_flag(cmd: &Command, name: &str) -> bool {
  function find_flag_by_rev (line 1226) | fn find_flag_by_rev(cmd: &Command, rev_name: &str) -> Option<String> {
  function flag_forward_value (line 1249) | fn flag_forward_value(cmd: &Command, long_name: &str) -> String {
  function flag_forward_value_by_short (line 1270) | fn flag_forward_value_by_short(cmd: &Command, ch: char) -> String {
  function flag_reverse_value_by_rev (line 1291) | fn flag_reverse_value_by_rev(cmd: &Command, rev_name: &str) -> String {
  function is_short_flag (line 1319) | fn is_short_flag(cmd: &Command, ch: char) -> bool {
  function short_to_long (line 1328) | fn short_to_long(cmd: &Command, ch: char) -> Option<String> {

FILE: data/rust/morloc-nexus/src/help.rs
  function print_nexus_usage (line 6) | pub fn print_nexus_usage(prog_name: &str) -> ! {
  function print_usage (line 34) | pub fn print_usage(prog_name: &str, manifest: &Manifest) -> ! {
  function print_group_usage (line 107) | pub fn print_group_usage(prog_name: &str, manifest: &Manifest, group_nam...
  function print_command_help (line 141) | pub fn print_command_help(prog_name: &str, cmd: &Command) -> ! {
  function print_command_help_single (line 159) | pub fn print_command_help_single(prog_name: &str, cmd: &Command) -> ! {
  function print_usage_suffix (line 194) | fn print_usage_suffix(cmd: &Command) {
  function print_command_body (line 206) | fn print_command_body(cmd: &Command) {
  function print_args_body (line 222) | fn print_args_body(cmd: &Command) {
  function print_opt_or_flag (line 295) | fn print_opt_or_flag(arg: &Arg) {
  function print_group_entry (line 365) | fn print_group_entry(entry: &GroupEntry) {
  function print_return_info (line 431) | fn print_return_info(cmd: &Command) {
  type TypeLayout (line 450) | struct TypeLayout<'a> {
  function render_schema_type (line 460) | fn render_schema_type(s: &morloc_runtime::schema::Schema) -> String {
  function extract_named_layout (line 521) | fn extract_named_layout<'a>(
  function collect_command_layouts (line 557) | fn collect_command_layouts<'a>(cmd: &'a Command) -> Vec<TypeLayout<'a>> {
  function print_type_definitions (line 599) | fn print_type_definitions(cmd: &Command) {
  function print_layouts (line 621) | fn print_layouts(defs: &[&TypeLayout]) {

FILE: data/rust/morloc-nexus/src/main.rs
  function morloc_home (line 15) | fn morloc_home() -> String {
  function main (line 24) | fn main() {
  function run_daemon (line 245) | fn run_daemon(
  function run_router (line 364) | fn run_router(config: &dispatch::NexusConfig) {
  function run_call_packet (line 426) | fn run_call_packet(config: &dispatch::NexusConfig, tmpdir: &str) {

FILE: data/rust/morloc-nexus/src/process.rs
  constant MAX_DAEMONS (line 12) | pub const MAX_DAEMONS: usize = 32;
  constant INITIAL_PING_TIMEOUT (line 14) | const INITIAL_PING_TIMEOUT: Duration = Duration::from_millis(10);
  constant INITIAL_RETRY_DELAY (line 15) | const INITIAL_RETRY_DELAY: Duration = Duration::from_millis(1);
  constant RETRY_MULTIPLIER (line 16) | const RETRY_MULTIPLIER: f64 = 1.25;
  constant MAX_RETRIES (line 17) | const MAX_RETRIES: usize = 16;
  constant INIT (line 23) | const INIT: AtomicI32 = AtomicI32::new(0);
  constant INIT (line 29) | const INIT: AtomicI32 = AtomicI32::new(0);
  constant INIT (line 35) | const INIT: AtomicI32 = AtomicI32::new(0);
  type PoolSocket (line 53) | pub struct PoolSocket {
  function sigchld_handler (line 63) | extern "C" fn sigchld_handler(_sig: libc::c_int) {
  function signal_exit_handler (line 89) | extern "C" fn signal_exit_handler(sig: libc::c_int) {
  function install_signal_handlers (line 97) | pub fn install_signal_handlers() {
  function set_tmpdir (line 117) | pub fn set_tmpdir(path: String) {
  function get_tmpdir (line 122) | pub fn get_tmpdir() -> Option<&'static str> {
  function clean_exit (line 139) | pub fn clean_exit(exit_code: i32) -> ! {
  function setup_sockets (line 222) | pub fn setup_sockets(pools: &[Pool], tmpdir: &str, shm_basename: &str) -...
  function start_language_server (line 254) | fn start_language_server(socket: &PoolSocket) -> Result<i32, String> {
  function start_daemons (line 288) | pub fn start_daemons(sockets: &mut [PoolSocket], indices: &[usize]) -> R...
  function wait_for_daemon (line 307) | fn wait_for_daemon(socket: &PoolSocket, pool_index: usize) -> Result<(),...
  function pool_is_alive_ptr (line 371) | pub fn pool_is_alive_ptr() -> *const std::ffi::c_void {
  function pool_is_alive (line 379) | pub fn pool_is_alive(pool_index: usize) -> bool {
  function pool_death_info (line 391) | pub fn pool_death_info(pool_index: usize) -> Option<String> {
  function validate_pools (line 408) | pub fn validate_pools(pools: &[Pool]) -> Result<(), String> {
  function make_tmpdir (line 423) | pub fn make_tmpdir() -> Result<String, String> {
  function make_job_hash (line 439) | pub fn make_job_hash(seed: u64) -> u64 {
  function set_child_subreaper (line 454) | pub fn set_child_subreaper() {

FILE: data/rust/morloc-runtime/build.rs
  function main (line 1) | fn main() {

FILE: data/rust/morloc-runtime/src/arrow_ffi.rs
  constant ARROW_SHM_MAGIC (line 11) | const ARROW_SHM_MAGIC: u32 = 0xA770DA7A;
  constant ARROW_BUFFER_ALIGN (line 12) | const ARROW_BUFFER_ALIGN: usize = 64;
  function arrow_align_up (line 14) | fn arrow_align_up(x: usize) -> usize {
  type ArrowSchema (line 21) | pub struct ArrowSchema {
  type ArrowArray (line 34) | pub struct ArrowArray {
  type ArrowColumnDesc (line 50) | pub struct ArrowColumnDesc {
  type ArrowShmHeader (line 61) | pub struct ArrowShmHeader {
  constant MORLOC_NIL (line 71) | const MORLOC_NIL: u32 = 0;
  constant MORLOC_BOOL (line 72) | const MORLOC_BOOL: u32 = 1;
  constant MORLOC_SINT8 (line 73) | const MORLOC_SINT8: u32 = 2;
  constant MORLOC_SINT16 (line 74) | const MORLOC_SINT16: u32 = 3;
  constant MORLOC_SINT32 (line 75) | const MORLOC_SINT32: u32 = 4;
  constant MORLOC_SINT64 (line 76) | const MORLOC_SINT64: u32 = 5;
  constant MORLOC_UINT8 (line 77) | const MORLOC_UINT8: u32 = 6;
  constant MORLOC_UINT16 (line 78) | const MORLOC_UINT16: u32 = 7;
  constant MORLOC_UINT32 (line 79) | const MORLOC_UINT32: u32 = 8;
  constant MORLOC_UINT64 (line 80) | const MORLOC_UINT64: u32 = 9;
  constant MORLOC_FLOAT32 (line 81) | const MORLOC_FLOAT32: u32 = 10;
  constant MORLOC_FLOAT64 (line 82) | const MORLOC_FLOAT64: u32 = 11;
  constant MORLOC_STRING (line 83) | const MORLOC_STRING: u32 = 12;
  function arrow_element_size (line 86) | pub extern "C" fn arrow_element_size(serial_type: u32) -> usize {
  function arrow_format_string (line 97) | pub extern "C" fn arrow_format_string(serial_type: u32) -> *const c_char {
  function arrow_format_to_type (line 116) | pub unsafe extern "C" fn arrow_format_to_type(format: *const c_char) -> ...
  function arrow_column_desc (line 140) | pub unsafe extern "C" fn arrow_column_desc(
  function arrow_column_data (line 152) | pub unsafe extern "C" fn arrow_column_data(
  function arrow_column_name (line 162) | pub unsafe extern "C" fn arrow_column_name(
  function arrow_to_shm (line 174) | pub unsafe extern "C" fn arrow_to_shm(
  function arrow_validate (line 322) | pub unsafe extern "C" fn arrow_validate(
  function arrow_shm_child_schema_release (line 358) | unsafe extern "C" fn arrow_shm_child_schema_release(schema: *mut ArrowSc...
  function arrow_shm_child_array_release (line 365) | unsafe extern "C" fn arrow_shm_child_array_release(array: *mut ArrowArra...
  function arrow_shm_schema_release (line 372) | unsafe extern "C" fn arrow_shm_schema_release(schema: *mut ArrowSchema) {
  function arrow_shm_array_release (line 386) | unsafe extern "C" fn arrow_shm_array_release(array: *mut ArrowArray) {
  function arrow_from_shm (line 405) | pub unsafe extern "C" fn arrow_from_shm(
  function print_arrow_value (line 477) | unsafe fn print_arrow_value(desc: *const ArrowColumnDesc, col_data: *con...
  function print_arrow_as_json (line 520) | pub unsafe extern "C" fn print_arrow_as_json(
  function print_arrow_as_table (line 565) | pub unsafe extern "C" fn print_arrow_as_table(

FILE: data/rust/morloc-runtime/src/cache.rs
  function hash_voidstar (line 15) | pub unsafe extern "C" fn hash_voidstar(
  function hash_voidstar_inner (line 32) | fn hash_voidstar_inner(
  function hash_morloc_packet (line 95) | pub unsafe extern "C" fn hash_morloc_packet(
  function make_cache_filename_ext (line 175) | pub unsafe extern "C" fn make_cache_filename_ext(
  function make_cache_filename (line 195) | pub unsafe extern "C" fn make_cache_filename(
  function put_cache_packet (line 207) | pub unsafe extern "C" fn put_cache_packet(
  function get_cache_packet (line 298) | pub unsafe extern "C" fn get_cache_packet(
  function del_cache_packet (line 329) | pub unsafe extern "C" fn del_cache_packet(
  function check_cache_packet (line 360) | pub unsafe extern "C" fn check_cache_packet(

FILE: data/rust/morloc-runtime/src/cli.rs
  type ArgumentT (line 17) | pub struct ArgumentT {
  function initialize_positional (line 25) | pub unsafe extern "C" fn initialize_positional(value: *mut c_char) -> *m...
  function initialize_unrolled (line 40) | pub unsafe extern "C" fn initialize_unrolled(
  function free_argument_t (line 78) | pub unsafe extern "C" fn free_argument_t(arg: *mut ArgumentT) {
  function shfree_by_schema (line 109) | pub unsafe extern "C" fn shfree_by_schema(
  function shfree_by_schema_inner (line 128) | fn shfree_by_schema_inner(
  function adjust_voidstar_relptrs (line 175) | pub unsafe extern "C" fn adjust_voidstar_relptrs(
  function adjust_relptrs_inner (line 192) | fn adjust_relptrs_inner(
  function read_voidstar_binary (line 256) | pub unsafe extern "C" fn read_voidstar_binary(
  function load_morloc_data_file (line 297) | pub unsafe extern "C" fn load_morloc_data_file(
  function upload_packet (line 435) | unsafe fn upload_packet(
  function upload_packet_inner (line 454) | unsafe fn upload_packet_inner(
  function parse_cli_data_argument_singular (line 529) | unsafe fn parse_cli_data_argument_singular(
  function parse_cli_data_argument_unrolled (line 638) | unsafe fn parse_cli_data_argument_unrolled(
  function parse_cli_data_argument (line 712) | pub unsafe extern "C" fn parse_cli_data_argument(
  function make_call_packet_from_cli (line 749) | pub unsafe extern "C" fn make_call_packet_from_cli(

FILE: data/rust/morloc-runtime/src/cschema.rs
  type CSchema (line 11) | pub struct CSchema {
    method from_rust (line 22) | pub fn from_rust(schema: &Schema) -> *mut CSchema {
    method to_rust (line 72) | pub unsafe fn to_rust(cs: *const CSchema) -> Schema {
    method free (line 136) | pub unsafe fn free(schema: *mut CSchema) {

FILE: data/rust/morloc-runtime/src/daemon_ffi.rs
  constant DEFAULT_XXHASH_SEED (line 18) | const DEFAULT_XXHASH_SEED: u64 = 0;
  constant MAX_LP_MESSAGE (line 19) | const MAX_LP_MESSAGE: u32 = 64 * 1024 * 1024;
  type MorlocSocket (line 36) | pub struct MorlocSocket {
  type DaemonConfig (line 45) | pub struct DaemonConfig {
  type DaemonResponse (line 57) | pub struct DaemonResponse {
  type BindingEntry (line 66) | struct BindingEntry {
  type BindingStore (line 75) | struct BindingStore {
    method new (line 83) | fn new(base_dir: &str) -> Self {
    method lookup_hash (line 92) | fn lookup_hash(&self, hash: u64) -> Option<&BindingEntry> {
    method lookup_name (line 96) | fn lookup_name(&self, name: &str) -> Option<&BindingEntry> {
    method add_name (line 101) | fn add_name(&mut self, hash: u64, name: &str) {
    method bind (line 110) | fn bind(&mut self, expr: &str, name: Option<&str>, eval_timeout: i32) ...
    method list_json (line 227) | fn list_json(&self) -> String {
    method unbind (line 253) | fn unbind(&mut self, name: &str) -> bool {
  function binding_store_init (line 268) | pub unsafe extern "C" fn binding_store_init(base_dir: *const c_char) -> ...
  function binding_store_free (line 275) | pub unsafe extern "C" fn binding_store_free(store: *mut c_void) {
  type JsonRequest (line 284) | struct JsonRequest {
  function daemon_parse_request (line 294) | pub unsafe extern "C" fn daemon_parse_request(
  type JsonResponse (line 383) | struct JsonResponse {
  function daemon_parse_response (line 391) | pub unsafe extern "C" fn daemon_parse_response(
  function daemon_free_request (line 455) | pub unsafe extern "C" fn daemon_free_request(req: *mut DaemonRequest) {
  function daemon_free_response (line 478) | pub unsafe extern "C" fn daemon_free_response(resp: *mut DaemonResponse) {
  function daemon_serialize_response (line 497) | pub unsafe extern "C" fn daemon_serialize_response(
  function daemon_build_discovery (line 544) | pub unsafe extern "C" fn daemon_build_discovery(manifest: *mut c_void) -...
  function daemon_set_eval_timeout (line 554) | pub extern "C" fn daemon_set_eval_timeout(timeout_sec: i32) {
  function fork_morloc_command (line 562) | unsafe fn fork_morloc_command(subcmd: &str, expr: *const c_char) -> *mut...
  function read_fd_to_vec (line 664) | unsafe fn read_fd_to_vec(fd: i32) -> Vec<u8> {
  function daemon_dispatch (line 680) | pub unsafe extern "C" fn daemon_dispatch(
  function read_lp_message (line 1202) | unsafe fn read_lp_message(
  function write_lp_message (line 1275) | unsafe fn write_lp_message(
  function handle_lp_connection (line 1327) | unsafe fn handle_lp_connection(
  function handle_http_connection (line 1394) | unsafe fn handle_http_connection(
  type DaemonJob (line 1482) | struct DaemonJob {
  type JobQueue (line 1487) | struct JobQueue {
  type WorkerContext (line 1491) | struct WorkerContext {
  function set_socket_timeouts (line 1504) | fn set_socket_timeouts(fd: i32, timeout_sec: i32) {
  constant MAX_LISTENERS (line 1529) | const MAX_LISTENERS: usize = 3;
  function daemon_run (line 1532) | pub unsafe extern "C" fn daemon_run(
  function daemon_worker_fn (line 1780) | fn daemon_worker_fn(ctx: Arc<WorkerContext>) {
  function daemon_signal_handler_fn (line 1830) | extern "C" fn daemon_signal_handler_fn(_sig: i32) {

FILE: data/rust/morloc-runtime/src/error.rs
  type MorlocError (line 4) | pub enum MorlocError {
  function set_errmsg (line 29) | pub unsafe fn set_errmsg(errmsg: *mut *mut c_char, err: &MorlocError) {
  function clear_errmsg (line 41) | pub unsafe fn clear_errmsg(errmsg: *mut *mut c_char) {

FILE: data/rust/morloc-runtime/src/eval_ffi.rs
  function make_morloc_bound_var (line 16) | pub unsafe extern "C" fn make_morloc_bound_var(
  function make_morloc_literal (line 38) | pub unsafe extern "C" fn make_morloc_literal(
  function make_morloc_pattern (line 69) | pub unsafe extern "C" fn make_morloc_pattern(
  function make_morloc_pattern_end (line 91) | pub extern "C" fn make_morloc_pattern_end() -> *mut MorlocPattern {
  type BndVars (line 115) | type BndVars<'a> = HashMap<&'a str, AbsPtr>;
  function convert_keys_to_indices (line 122) | unsafe fn convert_keys_to_indices(
  function apply_getter (line 168) | unsafe fn apply_getter(
  function apply_setter_copy (line 213) | unsafe fn apply_setter_copy(
  function apply_setter_set (line 262) | unsafe fn apply_setter_set(
  function morloc_eval_r (line 303) | unsafe fn morloc_eval_r(
  function morloc_eval (line 675) | pub unsafe extern "C" fn morloc_eval(

FILE: data/rust/morloc-runtime/src/ffi.rs
  function shinit (line 38) | pub unsafe extern "C" fn shinit(
  function shopen (line 49) | pub unsafe extern "C" fn shopen(
  function shclose (line 61) | pub unsafe extern "C" fn shclose(errmsg: *mut *mut c_char) -> bool {
  function shm_set_fallback_dir (line 66) | pub unsafe extern "C" fn shm_set_fallback_dir(dir: *const c_char) {
  function shmalloc (line 74) | pub unsafe extern "C" fn shmalloc(size: usize, errmsg: *mut *mut c_char)...
  function shmemcpy (line 79) | pub unsafe extern "C" fn shmemcpy(
  function shcalloc (line 92) | pub unsafe extern "C" fn shcalloc(
  function shrealloc (line 101) | pub unsafe extern "C" fn shrealloc(
  function shfree (line 113) | pub unsafe extern "C" fn shfree(ptr: *mut c_void, errmsg: *mut *mut c_ch...
  function shincref (line 118) | pub unsafe extern "C" fn shincref(ptr: *mut c_void, errmsg: *mut *mut c_...
  function total_shm_size (line 125) | pub unsafe extern "C" fn total_shm_size() -> usize {
  function rel2abs (line 130) | pub unsafe extern "C" fn rel2abs(ptr: RelPtr, errmsg: *mut *mut c_char) ...
  function abs2rel (line 135) | pub unsafe extern "C" fn abs2rel(ptr: *mut c_void, errmsg: *mut *mut c_c...
  function abs2shm (line 140) | pub unsafe extern "C" fn abs2shm(ptr: *mut c_void, errmsg: *mut *mut c_c...
  function abs2blk (line 145) | pub unsafe extern "C" fn abs2blk(ptr: *mut c_void, errmsg: *mut *mut c_c...
  function vol2rel (line 160) | pub unsafe extern "C" fn vol2rel(ptr: VolPtr, shm_ptr: *const ShmHeader)...
  function vol2abs (line 165) | pub unsafe extern "C" fn vol2abs(ptr: VolPtr, shm_ptr: *const ShmHeader)...
  function parse_schema (line 172) | pub unsafe extern "C" fn parse_schema(
  function schema_to_string (line 192) | pub unsafe extern "C" fn schema_to_string(schema: *const CSchema) -> *mu...
  function free_schema (line 205) | pub unsafe extern "C" fn free_schema(schema: *mut CSchema) {
  function schema_is_fixed_width (line 210) | pub unsafe extern "C" fn schema_is_fixed_width(schema: *const CSchema) -...
  function schema_alignment (line 219) | pub unsafe extern "C" fn schema_alignment(schema: *const CSchema) -> usi...
  function pack_with_schema (line 232) | pub unsafe extern "C" fn pack_with_schema(
  function pack (line 264) | pub unsafe extern "C" fn pack(
  function unpack_with_schema (line 287) | pub unsafe extern "C" fn unpack_with_schema(
  function calculate_voidstar_size (line 317) | pub unsafe extern "C" fn calculate_voidstar_size(
  function calc_voidstar_size_inner (line 336) | pub fn calc_voidstar_size_inner(
  function get_ptr (line 425) | pub unsafe extern "C" fn get_ptr(

FILE: data/rust/morloc-runtime/src/hash.rs
  constant DEFAULT_SEED (line 7) | const DEFAULT_SEED: u64 = 0;
  function xxh64 (line 10) | pub fn xxh64(data: &[u8]) -> u64 {
  function xxh64_with_seed (line 17) | pub fn xxh64_with_seed(data: &[u8], seed: u64) -> u64 {
  function mix (line 24) | pub fn mix(a: u64, b: u64) -> u64 {
  function test_xxh64_empty (line 36) | fn test_xxh64_empty() {
  function test_xxh64_deterministic (line 42) | fn test_xxh64_deterministic() {
  function test_xxh64_different_inputs (line 49) | fn test_xxh64_different_inputs() {
  function test_mix_commutative_ish (line 56) | fn test_mix_commutative_ish() {

FILE: data/rust/morloc-runtime/src/http_ffi.rs
  constant HTTP_MAX_HEADERS (line 9) | const HTTP_MAX_HEADERS: usize = 8192;
  constant HTTP_MAX_REQUEST (line 10) | const HTTP_MAX_REQUEST: usize = 4 * 1024 * 1024;
  type HttpMethod (line 16) | pub enum HttpMethod {
  type HttpRequest (line 24) | pub struct HttpRequest {
  type DaemonMethod (line 33) | pub enum DaemonMethod {
  type DaemonRequest (line 45) | pub struct DaemonRequest {
  function http_parse_request (line 57) | pub unsafe extern "C" fn http_parse_request(
  function http_free_request (line 182) | pub unsafe extern "C" fn http_free_request(req: *mut HttpRequest) {
  function http_status_text (line 192) | fn http_status_text(status: i32) -> &'static str {
  function http_write_response (line 204) | pub unsafe extern "C" fn http_write_response(
  function extract_json_string (line 247) | fn extract_json_string(body: &str, key: &str) -> Option<String> {
  function http_to_daemon_request (line 274) | pub unsafe extern "C" fn http_to_daemon_request(

FILE: data/rust/morloc-runtime/src/intrinsics.rs
  function mlc_save (line 13) | pub unsafe extern "C" fn mlc_save(
  function mlc_save_json (line 55) | pub unsafe extern "C" fn mlc_save_json(
  function mlc_save_voidstar (line 94) | pub unsafe extern "C" fn mlc_save_voidstar(
  function mlc_load (line 187) | pub unsafe extern "C" fn mlc_load(
  function mlc_hash (line 236) | pub unsafe extern "C" fn mlc_hash(
  function mlc_show (line 263) | pub unsafe extern "C" fn mlc_show(
  function mlc_read (line 283) | pub unsafe extern "C" fn mlc_read(
  function _write_voidstar_binary_rust (line 319) | unsafe fn _write_voidstar_binary_rust(

FILE: data/rust/morloc-runtime/src/ipc.rs
  function send_and_receive (line 11) | pub fn send_and_receive(
  function read_packet (line 57) | pub fn read_packet(stream: &mut UnixStream) -> Result<(PacketHeader, Vec...
  function send_packet (line 86) | pub fn send_packet(

FILE: data/rust/morloc-runtime/src/ipc_ffi.rs
  type ClientList (line 12) | pub struct ClientList {
  type LanguageDaemon (line 20) | pub struct LanguageDaemon {
  constant BUFFER_SIZE (line 31) | const BUFFER_SIZE: usize = 65536;
  function close_socket (line 36) | pub unsafe extern "C" fn close_socket(socket_id: i32) {
  function close_daemon (line 43) | pub unsafe extern "C" fn close_daemon(daemon_ptr: *mut *mut LanguageDaem...
  function new_socket (line 77) | unsafe fn new_socket(errmsg: *mut *mut c_char) -> i32 {
  function new_server_addr (line 88) | unsafe fn new_server_addr(socket_path: *const c_char) -> libc::sockaddr_...
  function new_server (line 101) | unsafe fn new_server(socket_path: *const c_char, errmsg: *mut *mut c_cha...
  function start_daemon (line 131) | pub unsafe extern "C" fn start_daemon(
  function stream_from_client_wait (line 198) | pub unsafe extern "C" fn stream_from_client_wait(
  function stream_from_client (line 362) | pub unsafe extern "C" fn stream_from_client(
  function send_and_receive_over_socket_wait (line 372) | pub unsafe extern "C" fn send_and_receive_over_socket_wait(
  function send_and_receive_over_socket (line 448) | pub unsafe extern "C" fn send_and_receive_over_socket(
  function send_packet_to_foreign_server (line 459) | pub unsafe extern "C" fn send_packet_to_foreign_server(
  function wait_for_client_with_timeout (line 496) | pub unsafe extern "C" fn wait_for_client_with_timeout(
  function wait_for_client (line 581) | pub unsafe extern "C" fn wait_for_client(

FILE: data/rust/morloc-runtime/src/json.rs
  type ShmWriter (line 21) | struct ShmWriter {
    method new (line 30) | unsafe fn new(ptr: *mut u8, len: usize) -> Self {
    method as_ptr (line 35) | fn as_ptr(&self) -> *mut u8 { self.ptr }
    method write_bytes (line 37) | fn write_bytes(&self, offset: usize, src: &[u8]) {
    method zero (line 42) | fn zero(&self, offset: usize, count: usize) {
    method write_val (line 46) | fn write_val<T: Copy>(&self, offset: usize, val: T) {
    method write_array_header (line 50) | fn write_array_header(&self, offset: usize, size: usize, data_rel: shm...
    method sub (line 60) | fn sub(&self, offset: usize, sub_len: usize) -> ShmWriter {
  type ShmReader (line 69) | struct ShmReader { ptr: *const u8 }
    method new (line 74) | unsafe fn new(ptr: *const u8) -> Self { ShmReader { ptr } }
    method read_val (line 76) | fn read_val<T: Copy>(&self, offset: usize) -> T {
    method read_u8 (line 79) | fn read_u8(&self, offset: usize) -> u8 { self.read_val(offset) }
    method read_array (line 80) | fn read_array(&self, offset: usize) -> Array { unsafe { *(self.ptr.add...
    method read_str (line 82) | fn read_str(&self, offset: usize, len: usize) -> &str {
    method at (line 88) | fn at(&self, offset: usize) -> ShmReader {
  function read_json_with_schema (line 95) | pub fn read_json_with_schema(json_str: &str, schema: &Schema) -> Result<...
  function read_json_with_schema_dest (line 99) | pub fn read_json_with_schema_dest(
  function alloc (line 107) | fn alloc(dest: Option<AbsPtr>, size: usize) -> Result<ShmWriter, MorlocE...
  function json_to_voidstar (line 113) | fn json_to_voidstar(
  function extract_fields (line 215) | fn extract_fields(value: &serde_json::Value, schema: &Schema) -> Result<...
  function voidstar_to_json_string (line 226) | pub fn voidstar_to_json_string(ptr: AbsPtr, schema: &Schema) -> Result<S...
  function print_voidstar (line 234) | pub fn print_voidstar(ptr: AbsPtr, schema: &Schema) -> Result<(), Morloc...
  function pretty_print_voidstar (line 239) | pub fn pretty_print_voidstar(ptr: AbsPtr, schema: &Schema) -> Result<(),...
  function to_json (line 255) | fn to_json(r: &ShmReader, schema: &Schema, buf: &mut String) -> Result<(...
  function tensor_to_json (line 339) | fn tensor_to_json(
  function json_escape (line 363) | fn json_escape(s: &str, buf: &mut String) {
  function err (line 377) | fn err(msg: &str) -> MorlocError { MorlocError::Serialization(msg.into()) }
  function as_i64 (line 378) | fn as_i64(v: &serde_json::Value) -> Result<i64, MorlocError> { v.as_i64(...
  function as_u64 (line 379) | fn as_u64(v: &serde_json::Value) -> Result<u64, MorlocError> { v.as_u64(...
  function as_f64 (line 380) | fn as_f64(v: &serde_json::Value) -> Result<f64, MorlocError> { v.as_f64(...
  function write_float (line 382) | fn write_float(buf: &mut String, f: f64, fmt: &[u8]) {
  function setup (line 398) | fn setup() { crate::init_test_shm(); }
  function test_int (line 400) | fn test_int()     { setup(); let s = parse_schema("i4").unwrap(); let p ...
  function test_string (line 401) | fn test_string()  { setup(); let s = parse_schema("s").unwrap(); let p =...
  function test_bool (line 402) | fn test_bool()    { setup(); let s = parse_schema("b").unwrap(); let p =...
  function test_array (line 403) | fn test_array()   { setup(); let s = parse_schema("ai4").unwrap(); let p...
  function test_opt_some (line 404) | fn test_opt_some(){ setup(); let s = parse_schema("?i4").unwrap(); let p...
  function test_opt_null (line 405) | fn test_opt_null(){ setup(); let s = parse_schema("?i4").unwrap(); let p...

FILE: data/rust/morloc-runtime/src/json_ffi.rs
  function quoted (line 14) | pub unsafe extern "C" fn quoted(input: *const c_char) -> *mut c_char {
  function read_json_with_schema (line 35) | pub unsafe extern "C" fn read_json_with_schema(
  function voidstar_to_json_string (line 63) | pub unsafe extern "C" fn voidstar_to_json_string(
  function print_voidstar (line 90) | pub unsafe extern "C" fn print_voidstar(
  function pretty_print_voidstar (line 107) | pub unsafe extern "C" fn pretty_print_voidstar(
  type JsonBuf (line 126) | pub struct JsonBuf {
  function json_buf_new (line 132) | pub extern "C" fn json_buf_new() -> *mut JsonBuf {
  function json_buf_free (line 140) | pub unsafe extern "C" fn json_buf_free(jb: *mut JsonBuf) {
  function json_buf_finish (line 147) | pub unsafe extern "C" fn json_buf_finish(jb: *mut JsonBuf) -> *mut c_char {
  function jb_maybe_comma (line 158) | unsafe fn jb_maybe_comma(jb: &mut JsonBuf) {
  function json_write_obj_start (line 168) | pub unsafe extern "C" fn json_write_obj_start(jb: *mut JsonBuf) {
  function json_write_obj_end (line 177) | pub unsafe extern "C" fn json_write_obj_end(jb: *mut JsonBuf) {
  function json_write_arr_start (line 185) | pub unsafe extern "C" fn json_write_arr_start(jb: *mut JsonBuf) {
  function json_write_arr_end (line 194) | pub unsafe extern "C" fn json_write_arr_end(jb: *mut JsonBuf) {
  function json_write_key (line 202) | pub unsafe extern "C" fn json_write_key(jb: *mut JsonBuf, key: *const c_...
  function json_write_string (line 217) | pub unsafe extern "C" fn json_write_string(jb: *mut JsonBuf, val: *const...
  function json_write_int (line 245) | pub unsafe extern "C" fn json_write_int(jb: *mut JsonBuf, val: i64) {
  function json_write_uint (line 253) | pub unsafe extern "C" fn json_write_uint(jb: *mut JsonBuf, val: u64) {
  function json_write_bool (line 261) | pub unsafe extern "C" fn json_write_bool(jb: *mut JsonBuf, val: bool) {
  function json_write_null (line 269) | pub unsafe extern "C" fn json_write_null(jb: *mut JsonBuf) {
  function json_write_raw (line 277) | pub unsafe extern "C" fn json_write_raw(jb: *mut JsonBuf, raw: *const c_...
  function _print_arrow_as_json_stub (line 297) | unsafe fn _print_arrow_as_json_stub(
  function _print_arrow_as_table_stub (line 386) | unsafe fn _print_arrow_as_table_stub(

FILE: data/rust/morloc-runtime/src/lib.rs
  function init_test_shm (line 34) | pub(crate) fn init_test_shm() {

FILE: data/rust/morloc-runtime/src/manifest_ffi.rs
  type MorlocExpressionType (line 43) | pub enum MorlocExpressionType {
  type MorlocAppExpressionType (line 59) | pub enum MorlocAppExpressionType {
  type MorlocPatternType (line 67) | pub enum MorlocPatternType {
  type MorlocPattern (line 80) | pub struct MorlocPattern {
  type MorlocDataArray (line 105) | pub struct MorlocDataArray {
  type MorlocData (line 122) | pub struct MorlocData {
  type MorlocAppExpression (line 135) | pub struct MorlocAppExpression {
  type MorlocLamExpression (line 143) | pub struct MorlocLamExpression {
  type MorlocSaveExpression (line 150) | pub struct MorlocSaveExpression {
  type MorlocExpression (line 169) | pub struct MorlocExpression {
  type ManifestBuild (line 194) | pub struct ManifestBuild {
  type ManifestConstraint (line 201) | pub struct ManifestConstraint {
  type ManifestPool (line 210) | pub struct ManifestPool {
  type ManifestArgKind (line 220) | pub enum ManifestArgKind {
  type ManifestGrpEntry (line 228) | pub struct ManifestGrpEntry {
  type ManifestArg (line 234) | pub struct ManifestArg {
  type ManifestReturn (line 264) | pub struct ManifestReturn {
  type ManifestCmdGroup (line 275) | pub struct ManifestCmdGroup {
  type ManifestCommand (line 283) | pub struct ManifestCommand {
    method build_arg_schemas_array (line 342) | pub unsafe fn build_arg_schemas_array(&self) -> *mut *mut c_char {
  type ManifestService (line 305) | pub struct ManifestService {
  type Manifest (line 314) | pub struct Manifest {
  function c_strdup (line 370) | unsafe fn c_strdup(s: &str) -> *mut c_char {
  function nullable_strdup (line 377) | unsafe fn nullable_strdup(s: Option<&str>) -> *mut c_char {
  function build_pattern (line 386) | unsafe fn build_pattern(jp: &serde_json::Value) -> Result<*mut MorlocPat...
  function build_expr (line 430) | unsafe fn build_expr(je: &serde_json::Value) -> Result<*mut MorlocExpres...
  function build_manifest_expr (line 718) | pub unsafe extern "C" fn build_manifest_expr(
  function populate_constraint (line 747) | unsafe fn populate_constraint(dst: *mut ManifestConstraint, src: &morloc...
  function populate_constraints (line 755) | unsafe fn populate_constraints(
  function populate_metadata (line 769) | unsafe fn populate_metadata(src: &morloc_manifest::Metadata) -> *mut c_c...
  function populate_str_vec (line 780) | unsafe fn populate_str_vec(src: &[String]) -> (*mut *mut c_char, usize) {
  function populate_arg (line 790) | unsafe fn populate_arg(dst: *mut ManifestArg, src: &morloc_manifest::Arg) {
  function populate_return (line 918) | unsafe fn populate_return(dst: *mut ManifestReturn, src: &morloc_manifes...
  function populate_command (line 930) | unsafe fn populate_command(dst: *mut ManifestCommand, src: &morloc_manif...
  function populate_pool (line 985) | unsafe fn populate_pool(dst: *mut ManifestPool, src: &morloc_manifest::P...
  function populate_cmd_group (line 997) | unsafe fn populate_cmd_group(dst: *mut ManifestCmdGroup, src: &morloc_ma...
  function populate_service (line 1005) | unsafe fn populate_service(dst: *mut ManifestService, src: &morloc_manif...
  function parse_manifest (line 1023) | pub unsafe extern "C" fn parse_manifest(
  function read_manifest (line 1100) | pub unsafe extern "C" fn read_manifest(
  function free_str_array (line 1123) | unsafe fn free_str_array(arr: *mut *mut c_char) {
  function free_constraints (line 1135) | unsafe fn free_constraints(ptr: *mut ManifestConstraint, n: usize) {
  function free_arg (line 1151) | unsafe fn free_arg(arg: &ManifestArg) {
  function free_return (line 1193) | unsafe fn free_return(ret: &ManifestReturn) {
  function free_manifest (line 1208) | pub unsafe extern "C" fn free_manifest(manifest: *mut Manifest) {
  function manifest_to_discovery_json (line 1314) | pub unsafe extern "C" fn manifest_to_discovery_json(manifest: *const Man...

FILE: data/rust/morloc-runtime/src/mpack.rs
  function pack_with_schema (line 13) | pub fn pack_with_schema(ptr: AbsPtr, schema: &Schema) -> Result<Vec<u8>,...
  function pack_data (line 19) | fn pack_data(ptr: AbsPtr, schema: &Schema, buf: &mut Vec<u8>) -> Result<...
  function unpack_with_schema (line 134) | pub fn unpack_with_schema(
  function unpack_obj (line 151) | fn unpack_obj(
  function unpack_int (line 263) | fn unpack_int(ptr: AbsPtr, st: SerialType, reader: &mut &[u8]) -> Result...
  function read_float (line 285) | fn read_float(reader: &mut &[u8]) -> Result<f64, MorlocError> {
  function read_byte (line 325) | fn read_byte(reader: &mut &[u8]) -> Result<u8, MorlocError> {
  function read_be_u16 (line 332) | fn read_be_u16(reader: &mut &[u8]) -> Result<u16, MorlocError> {
  function read_be_u32 (line 339) | fn read_be_u32(reader: &mut &[u8]) -> Result<u32, MorlocError> {
  function read_be_u64 (line 346) | fn read_be_u64(reader: &mut &[u8]) -> Result<u64, MorlocError> {
  function calc_unpack_size (line 355) | fn calc_unpack_size(data: &[u8], schema: &Schema) -> Result<usize, Morlo...
  function calc_size_r (line 360) | fn calc_size_r(schema: &Schema, reader: &mut &[u8]) -> Result<usize, Mor...
  function skip_int (line 422) | fn skip_int(reader: &mut &[u8]) -> Result<(), MorlocError> {
  function setup_shm (line 445) | fn setup_shm() {
  function test_roundtrip_int_via_msgpack (line 450) | fn test_roundtrip_int_via_msgpack() {
  function test_roundtrip_string_via_msgpack (line 462) | fn test_roundtrip_string_via_msgpack() {
  function test_roundtrip_array_via_msgpack (line 473) | fn test_roundtrip_array_via_msgpack() {
  function test_roundtrip_bool_via_msgpack (line 484) | fn test_roundtrip_bool_via_msgpack() {
  function test_roundtrip_optional_null_via_msgpack (line 495) | fn test_roundtrip_optional_null_via_msgpack() {
  function test_pack_only_string (line 506) | fn test_pack_only_string() {
  function test_unpack_only_int (line 516) | fn test_unpack_only_int() {
  function test_unpack_only_string (line 527) | fn test_unpack_only_string() {

FILE: data/rust/morloc-runtime/src/packet.rs
  constant PACKET_MAGIC (line 5) | pub const PACKET_MAGIC: u32 = 0x0707_f86d;
  constant THIS_PLAIN (line 6) | pub const THIS_PLAIN: u16 = 0;
  constant THIS_VERSION (line 7) | pub const THIS_VERSION: u16 = 0;
  constant DEFAULT_FLAVOR (line 8) | pub const DEFAULT_FLAVOR: u16 = 0;
  constant DEFAULT_MODE (line 9) | pub const DEFAULT_MODE: u16 = 0;
  constant PACKET_TYPE_DATA (line 13) | pub const PACKET_TYPE_DATA: u8 = 0;
  constant PACKET_TYPE_CALL (line 14) | pub const PACKET_TYPE_CALL: u8 = 1;
  constant PACKET_TYPE_PING (line 15) | pub const PACKET_TYPE_PING: u8 = 2;
  constant PACKET_SOURCE_MESG (line 19) | pub const PACKET_SOURCE_MESG: u8 = 0x00;
  constant PACKET_SOURCE_FILE (line 20) | pub const PACKET_SOURCE_FILE: u8 = 0x01;
  constant PACKET_SOURCE_RPTR (line 21) | pub const PACKET_SOURCE_RPTR: u8 = 0x02;
  constant PACKET_FORMAT_JSON (line 25) | pub const PACKET_FORMAT_JSON: u8 = 0x00;
  constant PACKET_FORMAT_MSGPACK (line 26) | pub const PACKET_FORMAT_MSGPACK: u8 = 0x01;
  constant PACKET_FORMAT_TEXT (line 27) | pub const PACKET_FORMAT_TEXT: u8 = 0x02;
  constant PACKET_FORMAT_DATA (line 28) | pub const PACKET_FORMAT_DATA: u8 = 0x03;
  constant PACKET_FORMAT_VOIDSTAR (line 29) | pub const PACKET_FORMAT_VOIDSTAR: u8 = 0x04;
  constant PACKET_FORMAT_ARROW (line 30) | pub const PACKET_FORMAT_ARROW: u8 = 0x05;
  constant PACKET_COMPRESSION_NONE (line 34) | pub const PACKET_COMPRESSION_NONE: u8 = 0x00;
  constant PACKET_ENCRYPTION_NONE (line 35) | pub const PACKET_ENCRYPTION_NONE: u8 = 0x00;
  constant PACKET_STATUS_PASS (line 39) | pub const PACKET_STATUS_PASS: u8 = 0x00;
  constant PACKET_STATUS_FAIL (line 40) | pub const PACKET_STATUS_FAIL: u8 = 0x01;
  constant PACKET_ENTRYPOINT_LOCAL (line 44) | pub const PACKET_ENTRYPOINT_LOCAL: u8 = 0x00;
  constant PACKET_ENTRYPOINT_REMOTE_SFS (line 45) | pub const PACKET_ENTRYPOINT_REMOTE_SFS: u8 = 0x01;
  constant MORLOC_INLINE_THRESHOLD (line 49) | pub const MORLOC_INLINE_THRESHOLD: usize = 64 * 1024;
  constant METADATA_TYPE_SCHEMA_STRING (line 53) | pub const METADATA_TYPE_SCHEMA_STRING: u8 = 0x01;
  constant METADATA_TYPE_XXHASH (line 54) | pub const METADATA_TYPE_XXHASH: u8 = 0x02;
  constant METADATA_HEADER_MAGIC (line 55) | pub const METADATA_HEADER_MAGIC: [u8; 3] = *b"mmh";
  type CommandType (line 63) | pub struct CommandType {
  type CommandCall (line 70) | pub struct CommandCall {
  type CommandData (line 79) | pub struct CommandData {
  type CommandPing (line 91) | pub struct CommandPing {
  method fmt (line 109) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type PacketHeader (line 123) | pub struct PacketHeader {
    method new (line 153) | fn new(command: PacketCommand, offset: u32, length: u64) -> Self {
    method ping (line 167) | pub fn ping() -> Self {
    method local_call (line 181) | pub fn local_call(midx: u32, payload_len: u64) -> Self {
    method remote_call (line 197) | pub fn remote_call(midx: u32, payload_len: u64) -> Self {
    method data_mesg (line 213) | pub fn data_mesg(format: u8, payload_len: u64) -> Self {
    method data_rptr (line 232) | pub fn data_rptr(format: u8, payload_len: u64) -> Self {
    method fail (line 251) | pub fn fail(error_msg_len: u64) -> Self {
    method total_size (line 270) | pub fn total_size(&self) -> u64 {
    method is_valid (line 275) | pub fn is_valid(&self) -> bool {
    method command_type (line 280) | pub fn command_type(&self) -> u8 {
    method is_ping (line 284) | pub fn is_ping(&self) -> bool {
    method is_call (line 288) | pub fn is_call(&self) -> bool {
    method is_data (line 292) | pub fn is_data(&self) -> bool {
    method is_local_call (line 296) | pub fn is_local_call(&self) -> bool {
    method is_remote_call (line 300) | pub fn is_remote_call(&self) -> bool {
    method is_fail (line 304) | pub fn is_fail(&self) -> bool {
    method to_bytes (line 309) | pub fn to_bytes(&self) -> [u8; 32] {
    method from_bytes (line 314) | pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, MorlocError> {
  constant _ (line 134) | const _: () = assert!(std::mem::size_of::<PacketHeader>() == 32);
  constant _ (line 135) | const _: () = assert!(std::mem::size_of::<PacketCommand>() == 8);
  constant _ (line 136) | const _: () = assert!(std::mem::size_of::<CommandCall>() == 8);
  constant _ (line 137) | const _: () = assert!(std::mem::size_of::<CommandData>() == 8);
  type MetadataHeader (line 142) | pub struct MetadataHeader {
  constant _ (line 148) | const _: () = assert!(std::mem::size_of::<MetadataHeader>() == 8);
  function make_standard_data_packet (line 329) | pub fn make_standard_data_packet(relptr: crate::shm::RelPtr, schema: &cr...
  function make_mesg_data_packet (line 381) | pub fn make_mesg_data_packet(mpk_data: &[u8], schema: &crate::Schema) ->...
  function make_local_call_packet (line 425) | pub fn make_local_call_packet(midx: u32, arg_packets: &[Vec<u8>]) -> Vec...
  function make_fail_packet_bytes (line 446) | pub fn make_fail_packet_bytes(error_msg: &str) -> Vec<u8> {
  function get_data_payload (line 460) | pub fn get_data_payload(packet: &[u8]) -> Result<&[u8], MorlocError> {
  function get_error_message (line 476) | pub fn get_error_message(packet: &[u8]) -> Result<Option<String>, Morloc...
  function read_schema_from_meta (line 489) | pub fn read_schema_from_meta(packet: &[u8]) -> Result<Option<String>, Mo...
  function get_data_value (line 528) | pub fn get_data_value(
  function read_voidstar_binary (line 576) | fn read_voidstar_binary(
  function adjust_voidstar_relptrs (line 593) | fn adjust_voidstar_relptrs(
  function test_header_size (line 650) | fn test_header_size() {
  function test_ping_roundtrip (line 655) | fn test_ping_roundtrip() {
  function test_call_packet (line 665) | fn test_call_packet() {
  function test_fail_packet (line 680) | fn test_fail_packet() {
  function test_data_mesg (line 687) | fn test_data_mesg() {

FILE: data/rust/morloc-runtime/src/packet_ffi.rs
  type MorlocCall (line 16) | pub struct MorlocCall {
  function read_morloc_packet_header (line 26) | pub unsafe extern "C" fn read_morloc_packet_header(
  function packet_is_ping (line 45) | pub unsafe extern "C" fn packet_is_ping(
  function packet_is_local_call (line 56) | pub unsafe extern "C" fn packet_is_local_call(
  function packet_is_remote_call (line 67) | pub unsafe extern "C" fn packet_is_remote_call(
  function morloc_packet_size_from_header (line 80) | pub unsafe extern "C" fn morloc_packet_size_from_header(
  function morloc_packet_size (line 88) | pub unsafe extern "C" fn morloc_packet_size(
  function return_ping (line 101) | pub unsafe extern "C" fn return_ping(
  function make_ping_packet (line 124) | pub extern "C" fn make_ping_packet() -> *mut u8 {
  function build_schema_metadata (line 142) | unsafe fn build_schema_metadata(schema: *const CSchema) -> (*mut u8, usi...
  function make_data_packet_raw (line 178) | unsafe fn make_data_packet_raw(
  function make_data_packet_with_schema (line 227) | unsafe fn make_data_packet_with_schema(
  function make_standard_data_packet (line 250) | pub unsafe extern "C" fn make_standard_data_packet(
  function make_arrow_data_packet (line 275) | pub unsafe extern "C" fn make_arrow_data_packet(
  function make_mpk_data_packet (line 301) | pub unsafe extern "C" fn make_mpk_data_packet(
  function make_data_packet_from_mpk (line 321) | pub unsafe extern "C" fn make_data_packet_from_mpk(
  function get_data_packet_as_mpk (line 341) | pub unsafe extern "C" fn get_data_packet_as_mpk(
  function read_schema_from_packet_meta (line 466) | pub unsafe extern "C" fn read_schema_from_packet_meta(
  function make_fail_packet (line 499) | pub unsafe extern "C" fn make_fail_packet(
  function get_morloc_data_packet_error_message (line 520) | pub unsafe extern "C" fn get_morloc_data_packet_error_message(
  function get_morloc_data_packet_value (line 546) | pub unsafe extern "C" fn get_morloc_data_packet_value(
  function make_call_packet_gen (line 645) | unsafe fn make_call_packet_gen(
  function make_morloc_local_call_packet (line 704) | pub unsafe extern "C" fn make_morloc_local_call_packet(
  function make_morloc_remote_call_packet (line 714) | pub unsafe extern "C" fn make_morloc_remote_call_packet(
  function read_morloc_call_packet (line 726) | pub unsafe extern "C" fn read_morloc_call_packet(
  function free_morloc_call (line 800) | pub unsafe extern "C" fn free_morloc_call(call: *mut MorlocCall) {
  function write_voidstar_binary (line 823) | pub unsafe extern "C" fn write_voidstar_binary(
  function flatten_voidstar_to_buffer (line 843) | pub unsafe extern "C" fn flatten_voidstar_to_buffer(
  function make_data_packet_auto (line 880) | pub unsafe extern "C" fn make_data_packet_auto(
  function print_morloc_data_packet (line 928) | pub unsafe extern "C" fn print_morloc_data_packet(
  function print_binary (line 1026) | unsafe fn print_binary(

FILE: data/rust/morloc-runtime/src/pool_ffi.rs
  type PoolDispatchFn (line 11) | pub type PoolDispatchFn = unsafe extern "C" fn(
  type PoolConcurrency (line 17) | pub enum PoolConcurrency {
  type PoolConfig (line 24) | pub struct PoolConfig {
  function pool_mark_busy (line 54) | pub extern "C" fn pool_mark_busy() {
  function pool_mark_idle (line 67) | pub extern "C" fn pool_mark_idle() {
  function pool_sigterm_handler (line 78) | extern "C" fn pool_sigterm_handler(_sig: i32) {
  function pool_dispatch_packet (line 85) | pub unsafe extern "C" fn pool_dispatch_packet(
  function fail_from_errmsg (line 142) | unsafe fn fail_from_errmsg(errmsg: *mut c_char) -> *mut u8 {
  function try_send_fail (line 151) | unsafe fn try_send_fail(client_fd: i32, msg: *const c_char) {
  type JobQueue (line 167) | struct JobQueue {
    method new (line 173) | fn new() -> Self {
    method push (line 177) | fn push(&self, fd: i32) {
    method pop (line 183) | fn pop(&self) -> Option<i32> {
  function worker_loop (line 196) | unsafe fn worker_loop(queue: &JobQueue, config: &PoolConfig) {
  function pool_main_threads (line 240) | unsafe fn pool_main_threads(config: &PoolConfig, socket_path: *const c_c...
  function pool_main_single (line 302) | unsafe fn pool_main_single(config: &PoolConfig, socket_path: *const c_ch...
  function pool_main_fork (line 353) | unsafe fn pool_main_fork(config: &PoolConfig, socket_path: *const c_char...
  function send_fd (line 499) | unsafe fn send_fd(sock: i32, fd: i32) -> i32 {
  function recv_fd (line 520) | unsafe fn recv_fd(sock: i32) -> i32 {
  function pool_main (line 548) | pub unsafe extern "C" fn pool_main(

FILE: data/rust/morloc-runtime/src/router_ffi.rs
  constant SUN_PATH_LEN (line 18) | const SUN_PATH_LEN: usize = 108;
  constant DAEMON_POLL_INITIAL_MS (line 22) | const DAEMON_POLL_INITIAL_MS: f64 = 100.0;
  constant DAEMON_POLL_MULTIPLIER (line 23) | const DAEMON_POLL_MULTIPLIER: f64 = 1.25;
  constant DAEMON_POLL_MAX_RETRIES (line 24) | const DAEMON_POLL_MAX_RETRIES: usize = 16;
  function router_signal_handler_fn (line 30) | extern "C" fn router_signal_handler_fn(_sig: i32) {
  type RouterProgram (line 37) | pub struct RouterProgram {
  type Router (line 46) | pub struct Router {
  function router_init (line 55) | pub unsafe extern "C" fn router_init(
  function router_free (line 163) | pub unsafe extern "C" fn router_free(router: *mut Router) {
  function find_morloc_nexus (line 200) | unsafe fn find_morloc_nexus() -> Result<String, Vec<String>> {
  function router_start_program (line 267) | pub unsafe extern "C" fn router_start_program(
  function router_forward (line 406) | pub unsafe extern "C" fn router_forward(
  function connect_to_daemon (line 607) | unsafe fn connect_to_daemon(
  function serialize_request_to_json (line 673) | unsafe fn serialize_request_to_json(request: *mut DaemonRequest) -> Stri...
  function router_build_discovery (line 728) | pub unsafe extern "C" fn router_build_discovery(router: *mut Router) -> ...
  function router_http_to_request (line 803) | unsafe fn router_http_to_request(
  constant ROUTER_MAX_LISTENERS (line 951) | const ROUTER_MAX_LISTENERS: usize = 3;
  function router_run (line 954) | pub unsafe extern "C" fn router_run(config: *mut DaemonConfig, router: *...
  function make_error_json (line 1420) | fn make_error_json(error: &str) -> String {

FILE: data/rust/morloc-runtime/src/schema.rs
  type SerialType (line 6) | pub enum SerialType {
  constant SCHEMA_NIL (line 28) | const SCHEMA_NIL: u8 = b'z';
  constant SCHEMA_BOOL (line 29) | const SCHEMA_BOOL: u8 = b'b';
  constant SCHEMA_SINT (line 30) | const SCHEMA_SINT: u8 = b'i';
  constant SCHEMA_UINT (line 31) | const SCHEMA_UINT: u8 = b'u';
  constant SCHEMA_FLOAT (line 32) | const SCHEMA_FLOAT: u8 = b'f';
  constant SCHEMA_STRING (line 33) | const SCHEMA_STRING: u8 = b's';
  constant SCHEMA_ARRAY (line 34) | const SCHEMA_ARRAY: u8 = b'a';
  constant SCHEMA_TENSOR (line 35) | const SCHEMA_TENSOR: u8 = b'T';
  constant SCHEMA_TUPLE (line 36) | const SCHEMA_TUPLE: u8 = b't';
  constant SCHEMA_MAP (line 37) | const SCHEMA_MAP: u8 = b'm';
  constant SCHEMA_OPTIONAL (line 38) | const SCHEMA_OPTIONAL: u8 = b'?';
  type Schema (line 42) | pub struct Schema {
    method primitive (line 59) | pub fn primitive(serial_type: SerialType) -> Self {
    method is_fixed_width (line 82) | pub fn is_fixed_width(&self) -> bool {
    method alignment (line 103) | pub fn alignment(&self) -> usize {
  function parse_schema (line 142) | pub fn parse_schema(input: &str) -> Result<Schema, MorlocError> {
  function parse_schema_r (line 154) | fn parse_schema_r(bytes: &[u8], pos: usize) -> Result<(Schema, usize), M...
  function parse_hint (line 261) | fn parse_hint(bytes: &[u8], pos: usize) -> Result<(String, usize), Morlo...
  function parse_sized_int (line 284) | fn parse_sized_int(
  function parse_sized_float (line 309) | fn parse_sized_float(bytes: &[u8], pos: usize) -> Result<(Schema, usize)...
  function decode_base62 (line 326) | fn decode_base62(c: u8) -> Result<usize, MorlocError> {
  function encode_base62 (line 340) | fn encode_base62(n: usize) -> char {
  function make_array_schema (line 353) | fn make_array_schema(child: Schema) -> Schema {
  function make_optional_schema (line 365) | fn make_optional_schema(child: Schema) -> Schema {
  function make_tuple_schema (line 379) | fn make_tuple_schema(params: Vec<Schema>) -> Schema {
  function make_map_schema (line 393) | fn make_map_schema(params: Vec<Schema>, keys: Vec<String>) -> Schema {
  function make_tensor_schema (line 407) | fn make_tensor_schema(ndim: usize, child: Schema) -> Schema {
  function calculate_tuple_layout (line 420) | fn calculate_tuple_layout(params: &[Schema]) -> (usize, Vec<usize>) {
  function schema_to_string (line 440) | pub fn schema_to_string(schema: &Schema) -> String {
  function schema_to_string_inner (line 446) | fn schema_to_string_inner(schema: &Schema, buf: &mut String) {
  function test_parse_primitives (line 509) | fn test_parse_primitives() {
  function test_parse_array (line 519) | fn test_parse_array() {
  function test_parse_tuple (line 527) | fn test_parse_tuple() {
  function test_parse_nested (line 534) | fn test_parse_nested() {
  function test_parse_map (line 542) | fn test_parse_map() {
  function test_parse_optional (line 551) | fn test_parse_optional() {
  function test_parse_tensor (line 558) | fn test_parse_tensor() {
  function test_parse_with_hints (line 566) | fn test_parse_with_hints() {
  function test_roundtrip (line 578) | fn test_roundtrip() {
  function test_roundtrip_map (line 588) | fn test_roundtrip_map() {
  function dump (line 602) | fn dump(label: &str, s: &Schema, depth: usize) {
  function test_schema_compat_with_c (line 617) | fn test_schema_compat_with_c() {

FILE: data/rust/morloc-runtime/src/shm.rs
  function preallocate_fd (line 14) | unsafe fn preallocate_fd(fd: i32, size: i64) -> i32 {
  function preallocate_fd (line 19) | unsafe fn preallocate_fd(fd: i32, size: i64) -> i32 {
  constant SHM_MAGIC (line 25) | pub const SHM_MAGIC: u32 = 0xFECA_0DF0;
  constant BLK_MAGIC (line 26) | pub const BLK_MAGIC: u32 = 0x0CB1_0DF0;
  constant MAX_VOLUME_NUMBER (line 27) | pub const MAX_VOLUME_NUMBER: usize = 32;
  constant MAX_FILENAME_SIZE (line 28) | pub const MAX_FILENAME_SIZE: usize = 128;
  constant MAX_PATH_SIZE (line 29) | pub const MAX_PATH_SIZE: usize = 512;
  constant LOCK_UNLOCKED (line 31) | const LOCK_UNLOCKED: u32 = 0;
  constant LOCK_LOCKED (line 32) | const LOCK_LOCKED: u32 = 1;
  constant SPIN_LIMIT (line 33) | const SPIN_LIMIT: u32 = 40;
  constant LOCK_TIMEOUT_SECS (line 35) | const LOCK_TIMEOUT_SECS: u64 = 5;
  type RelPtr (line 40) | pub type RelPtr = isize;
  type VolPtr (line 42) | pub type VolPtr = isize;
  type AbsPtr (line 44) | pub type AbsPtr = *mut u8;
  constant RELNULL (line 46) | pub const RELNULL: RelPtr = -1;
  constant VOLNULL (line 47) | pub const VOLNULL: VolPtr = -1;
  constant BLOCK_ALIGN (line 51) | pub const BLOCK_ALIGN: usize = std::mem::align_of::<BlockHeader>();
  function align_up (line 54) | pub const fn align_up(x: usize, align: usize) -> usize {
  type ShmHeader (line 61) | pub struct ShmHeader {
  type BlockHeader (line 72) | pub struct BlockHeader {
  constant _ (line 78) | const _: () = assert!(
  type Array (line 90) | pub struct Array {
  type Tensor (line 97) | pub struct Tensor {
  type SendPtr (line 108) | struct SendPtr(*mut ShmHeader);
    method null (line 113) | const fn null() -> Self { SendPtr(std::ptr::null_mut()) }
    method is_null (line 114) | fn is_null(&self) -> bool { self.0.is_null() }
    method ptr (line 115) | fn ptr(&self) -> *mut ShmHeader { self.0 }
    method set (line 116) | fn set(&mut self, p: *mut ShmHeader) { self.0 = p; }
  function get_cstr_buf (line 119) | fn get_cstr_buf(buf: &[u8; MAX_FILENAME_SIZE]) -> &str {
  function set_cstr (line 136) | fn set_cstr(buf: &mut [u8], s: &str) {
  function get_cstr (line 143) | fn get_cstr(buf: &[u8]) -> &str {
  function shm_set_fallback_dir (line 151) | pub fn shm_set_fallback_dir(dir: &str) {
  function shinit (line 157) | pub fn shinit(
  function shopen (line 243) | pub fn shopen(volume_index: usize) -> Result<Option<*mut ShmHeader>, Mor...
  function shclose (line 326) | pub fn shclose() -> Result<(), MorlocError> {
  function shmalloc (line 359) | pub fn shmalloc(size: usize) -> Result<AbsPtr, MorlocError> {
  function shmemcpy (line 368) | pub fn shmemcpy(src: *const u8, size: usize) -> Result<AbsPtr, MorlocErr...
  function shcalloc (line 377) | pub fn shcalloc(nmemb: usize, size: usize) -> Result<AbsPtr, MorlocError> {
  function shfree (line 386) | pub fn shfree(ptr: AbsPtr) -> Result<(), MorlocError> {
  function shincref (line 392) | pub fn shincref(ptr: AbsPtr) -> Result<(), MorlocError> {
  function rel2abs (line 407) | pub fn rel2abs(ptr: RelPtr) -> Result<AbsPtr, MorlocError> {
  function abs2rel (line 464) | pub fn abs2rel(ptr: AbsPtr) -> Result<RelPtr, MorlocError> {
  function abs2shm (line 490) | pub fn abs2shm(ptr: AbsPtr) -> Result<*mut ShmHeader, MorlocError> {
  function total_shm_size (line 511) | pub fn total_shm_size() -> usize {
  function try_open_shm (line 525) | fn try_open_shm(
  function shmalloc_unlocked (line 609) | fn shmalloc_unlocked(size: usize) -> Result<AbsPtr, MorlocError> {
  function shfree_unlocked (line 623) | fn shfree_unlocked(ptr: AbsPtr) -> Result<(), MorlocError> {
  function find_free_block (line 648) | fn find_free_block(
  function find_free_block_in_volume (line 697) | fn find_free_block_in_volume(
  function scan_volume (line 754) | unsafe fn scan_volume(
  function split_block (line 786) | fn split_block(
  function vol2abs_raw (line 827) | unsafe fn vol2abs_raw(ptr: VolPtr, shm: *const ShmHeader) -> *mut u8 {
  function shm_lock (line 841) | pub unsafe fn shm_lock(lock: &AtomicU32) -> Result<(), MorlocError> {
  function shm_lock_slow (line 863) | unsafe fn shm_lock_slow(lock: &AtomicU32) -> Result<(), MorlocError> {
  function shm_lock_slow (line 901) | unsafe fn shm_lock_slow(lock: &AtomicU32) -> Result<(), MorlocError> {
  function shm_unlock (line 917) | pub unsafe fn shm_unlock(lock: &AtomicU32) {
  function vol2rel (line 933) | pub fn vol2rel(ptr: VolPtr, shm: &ShmHeader) -> RelPtr {
  function vol2abs (line 940) | pub unsafe fn vol2abs(ptr: VolPtr, shm: *const ShmHeader) -> AbsPtr {
  function test_block_header_no_padding (line 951) | fn test_block_header_no_padding() {
  function test_align_up (line 959) | fn test_align_up() {
  function test_pointer_constants (line 968) | fn test_pointer_constants() {
  function test_lock_unlock (line 974) | fn test_lock_unlock() {
  function test_array_struct_size (line 985) | fn test_array_struct_size() {
  function test_shinit_and_shmalloc (line 993) | fn test_shinit_and_shmalloc() {

FILE: data/rust/morloc-runtime/src/slurm_ffi.rs
  constant MAX_SLURM_COMMAND_LENGTH (line 9) | const MAX_SLURM_COMMAND_LENGTH: usize = 1024;
  constant DEFAULT_XXHASH_SEED (line 10) | const DEFAULT_XXHASH_SEED: u64 = 0;
  type Resources (line 15) | pub struct Resources {
  function parse_slurm_time (line 25) | pub unsafe extern "C" fn parse_slurm_time(
  function write_slurm_time (line 84) | pub unsafe extern "C" fn write_slurm_time(seconds: i32) -> *mut c_char {
  function parse_morloc_call_arguments (line 103) | pub unsafe extern "C" fn parse_morloc_call_arguments(
  function slurm_job_is_complete (line 142) | pub unsafe extern "C" fn slurm_job_is_complete(job_id: u32) -> bool {
  function shell_escape (line 162) | fn shell_escape(input: &str) -> String {
  function submit_morloc_slurm_job (line 179) | pub unsafe extern "C" fn submit_morloc_slurm_job(
  function remote_call (line 318) | pub unsafe extern "C" fn remote_call(

FILE: data/rust/morloc-runtime/src/utility.rs
  function errno_val (line 15) | pub unsafe fn errno_val() -> i32 {
  function errno_val (line 21) | pub unsafe fn errno_val() -> i32 {
  constant SEND_NOSIGNAL (line 27) | pub const SEND_NOSIGNAL: i32 = libc::MSG_NOSIGNAL;
  constant SEND_NOSIGNAL (line 29) | pub const SEND_NOSIGNAL: i32 = 0;
  function set_nosigpipe (line 33) | pub unsafe fn set_nosigpipe(fd: i32) {
  function file_exists (line 50) | pub unsafe extern "C" fn file_exists(filename: *const c_char) -> bool {
  function mkdir_p (line 59) | pub unsafe extern "C" fn mkdir_p(path: *const c_char, errmsg: *mut *mut ...
  function delete_directory (line 79) | pub unsafe extern "C" fn delete_directory(path: *const c_char) {
  function has_suffix (line 88) | pub unsafe extern "C" fn has_suffix(x: *const c_char, suffix: *const c_c...
  function write_atomic (line 98) | pub unsafe extern "C" fn write_atomic(
  function read_binary_file (line 151) | pub unsafe extern "C" fn read_binary_file(
  function read_binary_fd (line 181) | pub unsafe extern "C" fn read_binary_fd(
  function write_binary_fd (line 242) | pub unsafe extern "C" fn write_binary_fd(
  function print_binary (line 265) | pub unsafe extern "C" fn print_binary(
  function hex (line 276) | pub unsafe extern "C" fn hex(ptr: *const c_void, size: usize) {
  function print_hex_dump (line 293) | pub unsafe extern "C" fn print_hex_dump(
  function mix (line 328) | pub extern "C" fn mix(a: u64, b: u64) -> u64 {
  function morloc_xxh64 (line 337) | pub unsafe extern "C" fn morloc_xxh64(
  function dirname (line 354) | pub unsafe extern "C" fn dirname(path: *mut c_char) -> *mut c_char {

FILE: data/rust/morloc-runtime/src/voidstar.rs
  function adjust_relptrs (line 15) | pub fn adjust_relptrs(
  function read_binary (line 63) | pub fn read_binary(blob: &[u8], schema: &Schema) -> Result<AbsPtr, Morlo...
  function free_by_schema (line 76) | pub fn free_by_schema(ptr: AbsPtr, schema: &Schema) -> Result<(), Morloc...
  function flatten_to_buffer (line 108) | pub fn flatten_to_buffer(data: AbsPtr, schema: &Schema) -> Result<Vec<u8...
  function flatten_fixup (line 122) | fn flatten_fixup(
  function write_binary_to_fd (line 218) | pub fn write_binary_to_fd(fd: i32, data: AbsPtr, schema: &Schema) -> Res...

FILE: test-suite/cmorloc-tests/test.c
  function SETUP (line 4) | SETUP
  function test_json_string_size (line 12) | void test_json_string_size() {
  function main (line 20) | int main() {

FILE: test-suite/concurrency-tests/helpers/py_funcs.py
  function py_collect (line 1) | def py_collect(*args):
  function py_id (line 4) | def py_id(x):

FILE: test-suite/daemon-tests/helpers.py
  function greet (line 1) | def greet(name):
  function strlen (line 4) | def strlen(s):

FILE: test-suite/error-message-tests/pool-crash-cpp/foo.hpp
  function cpp_crash (line 3) | int cpp_crash(int x){

FILE: test-suite/error-message-tests/runtime-error-cpp/foo.hpp
  function cpp_fail (line 3) | int cpp_fail(int x){

FILE: test-suite/error-message-tests/runtime-error-cross-lang/foo.hpp
  function cpp_fail (line 4) | std::string cpp_fail(std::string x){
  function cpp_id (line 9) | std::string cpp_id(std::string x){

FILE: test-suite/error-message-tests/runtime-error-cross-lang/foo.py
  function py_fail (line 1) | def py_fail(x):
  function py_id (line 4) | def py_id(x):

FILE: test-suite/error-message-tests/runtime-error-py/foo.py
  function py_fail (line 1) | def py_fail(x):

FILE: test-suite/executable-benchmark/distributed/foo.cpp
  function cmean (line 3) | double cmean(std::vector<double> xs){
  function cdouble (line 14) | double cdouble(double x){

FILE: test-suite/executable-benchmark/distributed/foo.py
  function simulate (line 6) | def simulate(n: int) -> list[float]:
  function mean (line 9) | def mean(xs: list[float]) -> float:
  function sd (line 12) | def sd(xs: list[float]) -> float:
  function double (line 16) | def double(x: float):
  function nTrials (line 19) | def nTrials(n: int, a, f):

FILE: test-suite/executable-benchmark/parallel-interop/foo.py
  function mockpy (line 3) | def mockpy(x):

FILE: test-suite/executable-benchmark/parallel-interop/parallel.py
  function pmap (line 3) | def pmap(f, xs):
  function smap (line 8) | def smap(f, xs):

FILE: test-suite/executable-benchmark/serial-interop/foo.hpp
  function T (line 5) | T cid(T x) {
  function noop (line 10) | int noop(const T& x) { return 1; }
  function strlen (line 12) | int strlen(const std::string& x){
  function nmb (line 16) | std::string nmb(int n) {

FILE: test-suite/executable-benchmark/serial-interop/foo.py
  function nmb (line 1) | def nmb(n):
  function pid (line 4) | def pid(x):
  function addp (line 7) | def addp(x, y):
  function morloc_len (line 10) | def morloc_len(xs):

FILE: test-suite/golden-tests/arrow-immutable-cp/src.hpp
  function makeLargeTable (line 7) | mlc::ArrowTable makeLargeTable(int n) {
  function makeIndices (line 33) | std::vector<int> makeIndices(int n) {
  function sumReals (line 39) | double sumReals(const std::vector<double>& xs) {

FILE: test-suite/golden-tests/arrow-immutable-cp/src.py
  function lookupValue (line 1) | def lookupValue(table, i):

FILE: test-suite/golden-tests/arrow-immutable-pc/src.hpp
  function lookupValue (line 7) | double lookupValue(const mlc::ArrowTable& table, int i) {

FILE: test-suite/golden-tests/arrow-immutable-pc/src.py
  function makeLargeTable (line 3) | def makeLargeTable(n):
  function makeIndices (line 9) | def makeIndices(n):
  function sumReals (line 12) | def sumReals(xs):

FILE: test-suite/golden-tests/arrow-immutable-pr/src.py
  function makeLargeTable (line 3) | def makeLargeTable(n):
  function makeIndices (line 9) | def makeIndices(n):
  function sumReals (line 12) | def sumReals(xs):

FILE: test-suite/golden-tests/arrow-immutable-rp/src.py
  function lookupValue (line 1) | def lookupValue(table, i):

FILE: test-suite/golden-tests/arrow-nexus-cpp/src.hpp
  function makePeople (line 7) | mlc::ArrowTable makePeople() {

FILE: test-suite/golden-tests/arrow-nexus-py/src.py
  function makePeople (line 3) | def makePeople():

FILE: test-suite/golden-tests/bug-intrinsic-schema-crash/helper.py
  function identity (line 1) | def identity(x):

FILE: test-suite/golden-tests/bug-load-type-infer/helper.py
  function identity (line 1) | def identity(x):

FILE: test-suite/golden-tests/claude-test-10/sequence_align.hpp
  type Alignment (line 6) | struct Alignment {
  function Alignment (line 16) | Alignment alignSmithWaterman(std::string seq1, std::string seq2) {
  function findKmers (line 75) | std::vector<std::string> findKmers(std::string seq, int k) {
  function countKmer (line 86) | int countKmer(std::string seq, std::string kmer) {
  function validateSequence (line 99) | bool validateSequence(std::string seq) {

FILE: test-suite/golden-tests/claude-test-10/sequence_io.py
  function getSampleSequence (line 9) | def getSampleSequence(sampleId):
  function createSequence (line 23) | def createSequence(seqId, description, nucleotides):
  function formatAlignment (line 32) | def formatAlignment(alignment):

FILE: test-suite/golden-tests/claude-test-11/sysinfo.hpp
  function clockResNs (line 7) | int clockResNs() {
  function cpuCount (line 12) | int cpuCount() {
  function hashStr (line 17) | int hashStr(std::string s) {

FILE: test-suite/golden-tests/claude-test-11/sysinfo.py
  function procId (line 3) | def procId():
  function envHome (line 8) | def envHome():
  function calMonth (line 13) | def calMonth(year, month):

FILE: test-suite/golden-tests/claude-test-12/helper.py
  function my_id (line 1) | def my_id(x):
  function my_val (line 4) | def my_val():

FILE: test-suite/golden-tests/claude-test-13/stress.hpp
  function makeStr (line 7) | std::string makeStr(int n) {
  function strLen (line 11) | int strLen(const std::string& s) {
  function sumList (line 15) | int sumList(const std::vector<int>& xs) {
  function makeRange (line 21) | std::vector<int> makeRange(int n) {
  function incAll (line 27) | std::vector<int> incAll(const std::vector<int>& xs) {
  function idStr (line 33) | std::string idStr(const std::string& s) {
  function idList (line 37) | std::vector<int> idList(const std::vector<int>& xs) {

FILE: test-suite/golden-tests/claude-test-13/stress.py
  function makeStr (line 1) | def makeStr(n):
  function strLen (line 4) | def strLen(s):
  function sumList (line 7) | def sumList(xs):
  function makeRange (line 10) | def makeRange(n):
  function incAll (line 13) | def incAll(xs):
  function idStr (line 16) | def idStr(s):
  function idList (line 19) | def idList(xs):

FILE: test-suite/golden-tests/claude-test-14/edge.hpp
  function counter (line 7) | int counter() {
  function addTwo (line 12) | int addTwo(int a, int b) {
  function doubleIt (line 16) | int doubleIt(int x) {
  function makePair (line 20) | std::vector<int> makePair(int a, int b) {
  function replicateStr (line 24) | std::string replicateStr(int n, const std::string& s) {
  function lenStr (line 30) | int lenStr(const std::string& s) {
  function sumVec (line 34) | int sumVec(const std::vector<int>& xs) {
  function appendVec (line 40) | std::vector<int> appendVec(const std::vector<int>& a, const std::vector<...
  function incVec (line 46) | std::vector<int> incVec(const std::vector<int>& xs) {

FILE: test-suite/golden-tests/claude-test-14/edge.py
  function counter (line 3) | def counter():
  function addTwo (line 8) | def addTwo(a, b):
  function doubleIt (line 11) | def doubleIt(x):
  function makePair (line 14) | def makePair(a, b):
  function replicateStr (line 17) | def replicateStr(n, s):
  function lenStr (line 20) | def lenStr(s):
  function sumVec (line 23) | def sumVec(xs):
  function appendVec (line 26) | def appendVec(a, b):
  function incVec (line 29) | def incVec(xs):

FILE: test-suite/golden-tests/claude-test-15/bigdata.hpp
  function bigStr (line 7) | std::string bigStr(int n) {
  function bigStrLen (line 11) | int bigStrLen(const std::string& s) {
  function bigVec (line 15) | std::vector<int> bigVec(int n) {
  function bigVecSum (line 21) | int bigVecSum(const std::vector<int>& v) {
  function vecOfStrs (line 27) | std::vector<std::string> vecOfStrs(int n, int m) {
  function sumStrLens (line 32) | int sumStrLens(const std::vector<std::string>& vs) {
  function nestedVec (line 38) | std::vector<std::vector<int>> nestedVec(int outer, int inner) {
  function nestedSum (line 44) | int nestedSum(const std::vector<std::vector<int>>& vv) {
  function idVecStr (line 52) | std::vector<std::string> idVecStr(const std::vector<std::string>& vs) {
  function idNestedVec (line 56) | std::vector<std::vector<int>> idNestedVec(const std::vector<std::vector<...

FILE: test-suite/golden-tests/claude-test-15/bigdata.py
  function bigStr (line 1) | def bigStr(n):
  function bigStrLen (line 4) | def bigStrLen(s):
  function bigVec (line 7) | def bigVec(n):
  function bigVecSum (line 10) | def bigVecSum(v):
  function vecOfStrs (line 13) | def vecOfStrs(n, m):
  function sumStrLens (line 16) | def sumStrLens(vs):
  function nestedVec (line 19) | def nestedVec(outer, inner):
  function nestedSum (line 23) | def nestedSum(vv):
  function idVecStr (line 26) | def idVecStr(vs):
  function idNestedVec (line 29) | def idNestedVec(vv):

FILE: test-suite/golden-tests/claude-test-16/cstress.hpp
  function cmakeStr (line 7) | std::string cmakeStr(int n) {
  function cstrLen (line 11) | int cstrLen(const std::string& s) {
  function csumList (line 15) | int csumList(const std::vector<int>& xs) {
  function cmakeRange (line 21) | std::vector<int> cmakeRange(int n) {
  function cincAll (line 27) | std::vector<int> cincAll(const std::vector<int>& xs) {
  function cidStr (line 33) | std::string cidStr(const std::string& s) {
  function cidList (line 37) | std::vector<int> cidList(const std::vector<int>& xs) {
  function cdoubleIt (line 41) | int cdoubleIt(int x) {
  function caddTwo (line 45) | int caddTwo(int a, int b) {
  function cmakePair (line 49) | std::vector<int> cmakePair(int a, int b) {
  function creplicateStr (line 53) | std::string creplicateStr(int n, const std::string& s) {
  function cappendVec (line 59) | std::vector<int> cappendVec(const std::vector<int>& a, const std::vector...
  function cvecOfStrs (line 65) | std::vector<std::string> cvecOfStrs(int n, int m) {
  function csumStrLens (line 70) | int csumStrLens(const std::vector<std::string>& vs) {
  function cnestedVec (line 76) | std::vector<std::vector<int>> cnestedVec(int outer, int inner) {
  function cnestedSum (line 82) | int cnestedSum(const std::vector<std::vector<int>>& vv) {
  function ccounter (line 90) | int ccounter() {

FILE: test-suite/golden-tests/claude-test-16/pstress.py
  function pmakeStr (line 1) | def pmakeStr(n):
  function pstrLen (line 4) | def pstrLen(s):
  function psumList (line 7) | def psumList(xs):
  function pmakeRange (line 10) | def pmakeRange(n):
  function pincAll (line 13) | def pincAll(xs):
  function pidStr (line 16) | def pidStr(s):
  function pidList (line 19) | def pidList(xs):
  function pdoubleIt (line 22) | def pdoubleIt(x):
  function paddTwo (line 25) | def paddTwo(a, b):
  function pmakePair (line 28) | def pmakePair(a, b):
  function preplicateStr (line 31) | def preplicateStr(n, s):
  function pappendVec (line 34) | def pappendVec(a, b):
  function pvecOfStrs (line 37) | def pvecOfStrs(n, m):
  function psumStrLens (line 40) | def psumStrLens(vs):
  function pnestedVec (line 43) | def pnestedVec(outer, inner):
  function pnestedSum (line 47) | def pnestedSum(vv):
  function pcounter (line 51) | def pcounter():

FILE: test-suite/golden-tests/claude-test-17/helper.py
  function my_len (line 1) | def my_len(xs):
  function make_three (line 4) | def make_three():

FILE: test-suite/golden-tests/claude-test-18/helper.py
  function my_id (line 1) | def my_id(xs):
  function my_append (line 4) | def my_append(xs, ys):
  function make_two (line 7) | def make_two():
  function make_three (line 10) | def make_three():

FILE: test-suite/golden-tests/claude-test-19/helper.py
  function my_append (line 1) | def my_append(xs, ys):
  function make_two (line 4) | def make_two():
  function make_three (line 7) | def make_three():

FILE: test-suite/golden-tests/claude-test-20/helper.py
  function my_append (line 1) | def my_append(xs, ys):
  function make_two (line 4) | def make_two():
  function make_three (line 7) | def make_three():

FILE: test-suite/golden-tests/claude-test-5/game.hpp
  function initGame (line 5) | std::vector<std::vector<int>> initGame(int seed, int width, int height) {
  function updateGame (line 19) | std::vector<std::vector<int>> updateGame(std::vector<std::vector<int>> b...

FILE: test-suite/golden-tests/claude-test-5/game.py
  function drawGame (line 4) | def drawGame(board):
  function doSleep (line 16) | def doSleep(board, duration):
  function gameLoop (line 21) | def gameLoop(initBoard, updateFn, sleepTime, steps):

FILE: test-suite/golden-tests/claude-test-6/filters.hpp
  function blurFilter (line 6) | std::vector<std::vector<double>> blurFilter(std::vector<std::vector<doub...
  function edgeDetect (line 36) | std::vector<std::vector<double>> edgeDetect(std::vector<std::vector<doub...
  type ImageMetadata (line 60) | struct ImageMetadata {
  function ImageMetadata (line 66) | ImageMetadata getMetadata(std::vector<std::vector<double>> pixels) {

FILE: test-suite/golden-tests/claude-test-6/image_io.py
  function createTestImage (line 3) | def createTestImage(width, height):
  function pixelsToDict (line 10) | def pixelsToDict(pixels, metadata, stats):

FILE: test-suite/golden-tests/claude-test-7/aggregations.hpp
  type SalesRecord (line 6) | struct SalesRecord {
  type CategorySummary (line 14) | struct CategorySummary {
  function calculateRevenue (line 22) | double calculateRevenue(std::vector<SalesRecord> sales) {
  function fastGroupBy (line 31) | std::vector<CategorySummary> fastGroupBy(std::vector<SalesRecord> sales) {

FILE: test-suite/golden-tests/claude-test-7/data_io.py
  function generateSalesData (line 3) | def generateSalesData(n):
  function formatReport (line 24) | def formatReport(summaries):

FILE: test-suite/golden-tests/claude-test-8/string_ops.hpp
  type WordFreq (line 7) | struct WordFreq {
  function countWords (line 13) | std::vector<WordFreq> countWords(std::vector<std::string> tokens) {
  function findNgrams (line 34) | std::vector<std::string> findNgrams(std::vector<std::string> tokens, int...
  function calculateTfidf (line 50) | double calculateTfidf(std::string word, std::vector<std::string> tokens) {

FILE: test-suite/golden-tests/claude-test-8/text_processing.py
  function getSampleText (line 11) | def getSampleText(sampleId):
  function tokenizeText (line 15) | def tokenizeText(text):
  function createDocument (line 21) | def createDocument(docId, text):

FILE: test-suite/golden-tests/claude-test-9/helpers.py
  function last (line 1) | def last(xs):

FILE: test-suite/golden-tests/claude-test-9/market_io.py
  function createMarketParams (line 1) | def createMarketParams(spot, strike, volatility, riskFreeRate, timeToMat...
  function formatResults (line 11) | def formatResults(price, stdError):
  function extractFinalPrices (line 15) | def extractFinalPrices(paths):

FILE: test-suite/golden-tests/claude-test-9/monte_carlo.hpp
  type MarketParams (line 5) | struct MarketParams {
  type PriceDistribution (line 13) | struct PriceDistribution {
  function simulatePaths (line 24) | std::vector<std::vector<double>> simulatePaths(MarketParams params, int ...
  function priceCallOption (line 48) | double priceCallOption(MarketParams params, std::vector<std::vector<doub...
  function calculateStdError (line 65) | double calculateStdError(std::vector<double> values) {

FILE: test-suite/golden-tests/composition/paste.py
  function morloc_paste (line 1) | def morloc_paste(x, y):

FILE: test-suite/golden-tests/demo-trimming/foo.hpp
  type Config (line 22) | struct Config {
  function readFASTQ (line 28) | vector<FASTQRecord> readFASTQ(const Str& filename) {
  function writeFASTA (line 55) | int writeFASTA(const Str& filename, const std::vector< std::tuple<Str, S...
  function phredScore (line 71) | inline uint8_t phredScore(char c) {
  function trimRead (line 76) | std::string trimRead(

FILE: test-suite/golden-tests/edge-cases-1/foo.py
  function g (line 1) | def g(f, x):
  function f (line 4) | def f (f, xs):

FILE: test-suite/golden-tests/edge-cases-2/foo.py
  function foo (line 1) | def foo(name):

FILE: test-suite/golden-tests/effect-accumulate-py/foo.py
  function read_value (line 1) | def read_value():
  function risky_double (line 4) | def risky_double(x):

FILE: test-suite/golden-tests/effect-error-cpp/foo.hpp
  function riskyAdd (line 4) | int riskyAdd(int a, int b) {
  function safeAdd (line 8) | int safeAdd(int a, int b) {

FILE: test-suite/golden-tests/effect-subtype-py/foo.py
  function ioFunc (line 1) | def ioFunc():

FILE: test-suite/golden-tests/errors/foo.hpp
  function T (line 2) | T cid(T x){
  function cdiv (line 6) | double cdiv(double x){

FILE: test-suite/golden-tests/errors/foo.py
  function pid (line 1) | def pid(x):
  function pdiv (line 4) | def pdiv(x):

FILE: test-suite/golden-tests/eta-reduction-8-cpp/foo.hpp
  function onThree (line 9) | auto onThree(F f, const std::tuple<A, B, C>& x) -> std::invoke_result_t<...
  function inc (line 13) | int inc(int x){

FILE: test-suite/golden-tests/eta-reduction-8-py/foo.py
  function onThree (line 1) | def onThree(f, x):
  function inc (line 4) | def inc(x):

FILE: test-suite/golden-tests/file-input-c/foo.hpp
  function cat (line 6) | std::string cat(std::string x, std::string y){
  function len (line 11) | int len(std::string x){

FILE: test-suite/golden-tests/file-input-py/foo.py
  function cat (line 1) | def cat(xs):

FILE: test-suite/golden-tests/force-inline-basic/foo.hpp
  function sideEffect (line 6) | int sideEffect(int x) {
  function add (line 11) | int add(int a, int b) {

FILE: test-suite/golden-tests/formatting/foo.py
  function foo (line 1) | def foo(x):

FILE: test-suite/golden-tests/functional-data-1/bar.py
  function bar (line 4) | def bar(tools, x):

FILE: test-suite/golden-tests/functional-data-1/foo.hpp
  function funf (line 2) | int funf(int x, int y){
  function fung (line 7) | int fung(bool x, bool y){

FILE: test-suite/golden-tests/functional-data-2/foo.py
  function bar (line 1) | def bar(funcs, x):

FILE: test-suite/golden-tests/functional-data-3b/main.hpp
  function funf (line 1) | int funf(int x){

FILE: test-suite/golden-tests/functional-data-3b/main.py
  function fung (line 1) | def fung(x):
  function doit (line 4) | def doit(f, x):

FILE: test-suite/golden-tests/functional-data-3c/main.py
  function funf (line 1) | def funf(a):
  function fung (line 6) | def fung(b):
  function bar (line 11) | def bar(a, b):

FILE: test-suite/golden-tests/functional-data-3d-c/main.hpp
  function bar (line 3) | std::function<int(int)> bar(bool cond1, bool cond2) {
  function baz (line 11) | std::function<std::function<int(bool)>(int)> baz(bool cond1) {

FILE: test-suite/golden-tests/functional-data-3d-py/main.py
  function bar (line 1) | def bar(cond1, cond2):
  function baz (line 7) | def baz(cond1):

FILE: test-suite/golden-tests/functional-data-3d/main.py
  function bar (line 1) | def bar(cond1, cond2):
  function baz (line 7) | def baz(cond1):

FILE: test-suite/golden-tests/functional-data-3e/main.py
  function bar (line 1) | def bar(cond):

FILE: test-suite/golden-tests/functional-data-3f/main.py
  function bar (line 2) | def bar(cond):
  function fst (line 5) | def fst(xs):
  function snd (line 8) | def snd(xs):

FILE: test-suite/golden-tests/functional-data-4/main.py
  function runAll (line 1) | def runAll(x, fs):

FILE: test-suite/golden-tests/functional-data-5/main.py
  function runAll (line 1) | def runAll(x, fs):

FILE: test-suite/golden-tests/generic-hofs-1/foo.hpp
  function map (line 11) | auto map(F f, const std::vector<A> &xs) -> std::vector<std::invoke_resul...
  function B (line 19) | B snd(const std::tuple<A,B> &x){

FILE: test-suite/golden-tests/generic-hofs-2/foo.hpp
  function map (line 11) | auto map(F f, const std::vector<A> &xs) -> std::vector<std::invoke_resul...
  function B (line 19) | B bar(B dummy, const std::tuple<A,B> &x){

FILE: test-suite/golden-tests/higher-kinded-types/foo.py
  function morloc_map (line 1) | def morloc_map(f, xs):
  function testshow (line 4) | def testshow(x):

FILE: test-suite/golden-tests/hofs-1/eq.py
  function eq (line 3) | def eq(x, y):
  function check (line 12) | def check(xs):

FILE: test-suite/golden-tests/hofs-1/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {
  function czipWith (line 35) | std::vector<C> czipWith(

FILE: test-suite/golden-tests/hofs-1/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):
  function pzipWith (line 13) | def pzipWith(f, xs, ys):

FILE: test-suite/golden-tests/import-2/localmap/main.py
  function morloc_packMap (line 1) | def morloc_packMap (xs):
  function morloc_unpackMap (line 8) | def morloc_unpackMap (d):
  function morloc_person (line 11) | def morloc_person(name):

FILE: test-suite/golden-tests/infix-generic/foo.py
  function add (line 1) | def add(x, y):
  function morloc_map (line 4) | def morloc_map(f, xs):
  function morloc_str (line 7) | def morloc_str(x):

FILE: test-suite/golden-tests/infix-import/foo.py
  function add (line 1) | def add(x, y):

FILE: test-suite/golden-tests/infix-import/ops/ops.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):
  function pow (line 7) | def pow(x, y):
  function concat (line 10) | def concat(xs, ys):

FILE: test-suite/golden-tests/infix-local-fixity/ops-a/ops.py
  function left_assoc (line 1) | def left_assoc(x, y):

FILE: test-suite/golden-tests/infix-local-fixity/ops-b/ops.py
  function right_assoc (line 1) | def right_assoc(x, y):

FILE: test-suite/golden-tests/infix-polyglot/ops-cpp/ops.hpp
  function add (line 3) | int add(int x, int y) { return x + y; }
  function mul (line 4) | int mul(int x, int y) { return x * y; }

FILE: test-suite/golden-tests/infix-polyglot/ops-py/ops.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):

FILE: test-suite/golden-tests/infix-typeclass-import/foo.py
  function le (line 1) | def le(x, y):

FILE: test-suite/golden-tests/infix-typeclass-import/numops/ops.py
  function morloc_not (line 1) | def morloc_not(b):
  function morloc_and (line 4) | def morloc_and(p, q):
  function morloc_if (line 7) | def morloc_if(cond, t, f):

FILE: test-suite/golden-tests/infix-typeclass-polyglot/semiring-cpp/ops.hpp
  function add (line 3) | int add(int x, int y) { return x + y; }
  function mul (line 4) | int mul(int x, int y) { return x * y; }

FILE: test-suite/golden-tests/infix-typeclass-polyglot/semiring-py/ops.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):

FILE: test-suite/golden-tests/infix-typeclass-simple/foo.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):
  function neg (line 7) | def neg(x):

FILE: test-suite/golden-tests/infix/impl.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):
  function pow (line 7) | def pow(x, y):
  function cons (line 10) | def cons(x, xs):
  function append (line 13) | def append(xs, ys):
  function cons (line 16) | def cons(x, xs):
  function append (line 19) | def append(xs, ys):

FILE: test-suite/golden-tests/inline-cross-lang/foo.py
  function add (line 1) | def add(x, y):

FILE: test-suite/golden-tests/inline-func-py/foo.py
  function add (line 1) | def add(x, y):
  function double (line 4) | def double(x):
  function triple (line 7) | def triple(x):

FILE: test-suite/golden-tests/inline-ho-py/foo.py
  function double (line 1) | def double(x):
  function mymap (line 4) | def mymap(f, xs):

FILE: test-suite/golden-tests/inline-old-style-py/foo.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):

FILE: test-suite/golden-tests/inline-op-ho-py/foo.py
  function fold (line 1) | def fold(f, b, xs):

FILE: test-suite/golden-tests/inline-typeclass-py/ops.py
  function add (line 1) | def add(x, y):
  function mul (line 4) | def mul(x, y):

FILE: test-suite/golden-tests/interop-10/foo.hpp
  function f (line 11) | auto f(F func, a x) -> std::invoke_result_t<F, a> {
  function g (line 16) | int g(bool x){

FILE: test-suite/golden-tests/interop-10/foo.py
  function h (line 2) | def h(x):

FILE: test-suite/golden-tests/interop-11/incdef.hpp
  type bar_s (line 4) | struct bar_s {
  function inc (line 10) | int inc(int x) {

FILE: test-suite/golden-tests/interop-11/pysum.py
  function sum2 (line 1) | def sum2(xs):
  function sumDict (line 4) | def sumDict(bar):

FILE: test-suite/golden-tests/interop-2/foo.py
  function morloc_map (line 1) | def morloc_map(f, xs):
  function morloc_add (line 4) | def morloc_add(x, y):

FILE: test-suite/golden-tests/interop-3a-cp/foo.hpp
  function cneg (line 10) | int cneg(int x){
  function cadd (line 14) | int cadd(int x, int y){
  function cmul (line 18) | int cmul(int x, int y){
  function cmap (line 23) | auto cmap(F f, const std::vector<A>& xs) -> std::vector<std::invoke_resu...

FILE: test-suite/golden-tests/interop-3a-cp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3a-pp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3a-pr/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3a-rc/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3a-rc/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3b-cp/foo.hpp
  function cneg (line 10) | int cneg(int x){
  function cadd (line 14) | int cadd(int x, int y){
  function cmul (line 18) | int cmul(int x, int y){
  function cmap (line 23) | auto cmap(F f, const std::vector<A>& xs) -> std::vector<std::invoke_resu...

FILE: test-suite/golden-tests/interop-3b-cp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3b-pp/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3b-pp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3b-pr/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3b-pr/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3b-rc/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3b-rc/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3c-cp/foo.hpp
  function cneg (line 10) | int cneg(int x){
  function cadd (line 14) | int cadd(int x, int y){
  function cmul (line 18) | int cmul(int x, int y){
  function cmap (line 23) | auto cmap(F f, const std::vector<A>& xs) -> std::vector<std::invoke_resu...

FILE: test-suite/golden-tests/interop-3c-cp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3c-pp/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3c-pp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3c-pr/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3c-pr/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3c-rc/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3c-rc/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3d-cp/foo.hpp
  function cneg (line 10) | int cneg(int x){
  function cadd (line 14) | int cadd(int x, int y){
  function cmul (line 18) | int cmul(int x, int y){
  function cmap (line 23) | auto cmap(F f, const std::vector<A>& xs) -> std::vector<std::invoke_resu...

FILE: test-suite/golden-tests/interop-3d-cp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3d-pp/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3d-pp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3d-pr/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3d-pr/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3d-rc/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3d-rc/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-3e-cp/foo.hpp
  function cneg (line 10) | int cneg(int x){
  function cadd (line 14) | int cadd(int x, int y){
  function cmul (line 18) | int cmul(int x, int y){
  function cmap (line 23) | auto cmap(F f, const std::vector<A>& xs) -> std::vector<std::invoke_resu...
  function czipWith (line 34) | auto czipWith(

FILE: test-suite/golden-tests/interop-3e-cp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):
  function pzipWith (line 13) | def pzipWith(f, xs, ys):

FILE: test-suite/golden-tests/interop-3e-pp/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3e-pp/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):
  function pzipWith (line 13) | def pzipWith(f, xs, ys):

FILE: test-suite/golden-tests/interop-3e-pr/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3e-pr/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):
  function pzipWith (line 13) | def pzipWith(f, xs, ys):

FILE: test-suite/golden-tests/interop-3e-rc/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3e-rc/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):
  function pzipWith (line 13) | def pzipWith(f, xs, ys):

FILE: test-suite/golden-tests/interop-3f/foo.hpp
  function cneg (line 9) | int cneg(int x){
  function cadd (line 13) | int cadd(int x, int y){
  function cmul (line 17) | int cmul(int x, int y){
  function cmap (line 22) | std::vector<B> cmap(F f, const std::vector<A>& xs) {

FILE: test-suite/golden-tests/interop-3f/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-5/foo.hpp
  function cneg (line 10) | int cneg(int x){
  function cadd (line 14) | int cadd(int x, int y){
  function cmul (line 18) | int cmul(int x, int y){
  function cmap (line 23) | auto cmap(F f, const std::vector<A>& xs) -> std::vector<std::invoke_resu...

FILE: test-suite/golden-tests/interop-5/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-6/foo.py
  function pneg (line 1) | def pneg(x):
  function padd (line 4) | def padd(x, y):
  function pmul (line 7) | def pmul(x, y):
  function pmap (line 10) | def pmap(f, xs):

FILE: test-suite/golden-tests/interop-7/foo.hpp
  function A (line 19) | A g(

FILE: test-suite/golden-tests/interop-8-py-to-r/foo.py
  function f (line 1) | def f(n):

FILE: test-suite/golden-tests/interop-8-r-to-c/foo.hpp
  function C (line 5) | C g(F down, C b, A x){

FILE: test-suite/golden-tests/interop-8-r-to-py/foo.py
  function g (line 1) | def g(f, b, x):

FILE: test-suite/golden-tests/interop-9/foo.py
  function sub (line 1) | def sub(x, y):
  function add (line 4) | def add(x, y):

FILE: test-suite/golden-tests/intrinsic-hash/foo.hpp
  function identity_int (line 3) | int identity_int(int x) {
  function identity_str (line 7) | std::string identity_str(std::string x) {

FILE: test-suite/golden-tests/intrinsic-hash/foo.py
  function identity (line 1) | def identity(x):

FILE: test-suite/golden-tests/intrinsic-show-read/foo.hpp
  function identity_int (line 1) | int identity_int(int x) {

FILE: test-suite/golden-tests/let-crosslang/f.hpp
  function makeStr (line 7) | std::string makeStr(int n) {
  function strLen (line 11) | int strLen(const std::string& s) {
  function doubleIt (line 15) | int doubleIt(int x) {
  function addTwo (line 19) | int addTwo(int a, int b) {
  function makeRange (line 23) | std::vector<int> makeRange(int n) {
  function sumList (line 29) | int sumList(const std::vector<int>& xs) {
  function incAll (line 35) | std::vector<int> incAll(const std::vector<int>& xs) {
  function idStr (line 41) | std::string idStr(const std::string& s) {
  function idList (line 45) | std::vector<int> idList(const std::vector<int>& xs) {
  function counter (line 49) | int counter() {

FILE: test-suite/golden-tests/let-crosslang/f.py
  function makeStr (line 1) | def makeStr(n):
  function strLen (line 4) | def strLen(s):
  function doubleIt (line 7) | def doubleIt(x):
  function addTwo (line 10) | def addTwo(a, b):
  function makeRange (line 13) | def makeRange(n):
  function sumList (line 16) | def sumList(xs):
  function incAll (line 19) | def incAll(xs):
  function idStr (line 22) | def idStr(s):
  function idList (line 25) | def idList(xs):
  function counter (line 29) | def counter():

FILE: test-suite/golden-tests/let-expressions/foo.hpp
  function sideEffectCpp (line 3) | int sideEffectCpp(int x) {

FILE: test-suite/golden-tests/let-expressions/foo.py
  function sideEffectPy (line 3) | def sideEffectPy(x):

FILE: test-suite/golden-tests/local-import-cousin-py/bar/baz/main.py
  function add (line 1) | def add(x, y):

FILE: test-suite/golden-tests/local-import-cousin-py/bif/biz/main.py
  function mul (line 1) | def mul(x, y):

FILE: test-suite/golden-tests/local-import-nested-py/lib/math/main.py
  function square (line 1) | def square(x):

FILE: test-suite/golden-tests/local-import-nested-py/util.py
  function negate (line 1) | def negate(x):

FILE: test-suite/golden-tests/local-import-root-py/root/main.py
  function double (line 1) | def double(x):

FILE: test-suite/golden-tests/memory-interop-misalign-cp/foo.hpp
  type pair_br_t (line 6) | struct pair_br_t {
  function cMakeOptReal (line 11) | std::optional<double> cMakeOptReal(double x) {
  function cFromNullReal (line 15) | double cFromNullReal(double def, const std::optional<double>& x) {
  function cDoubleOptReal (line 20) | std::optional<double> cDoubleOptReal(const std::optional<double>& x) {
  function pair_br_t (line 25) | pair_br_t cMakePair(bool flag, double value) {
  function cGetPairValue (line 29) | double cGetPairValue(const pair_br_t& p) {

FILE: test-suite/golden-tests/memory-interop-misalign-cp/foo.py
  function pMakeOptReal (line 1) | def pMakeOptReal(x):
  function pFromNullReal (line 4) | def pFromNullReal(default_val, x):
  function pMakePair (line 9) | def pMakePair(flag, value):
  function pGetPairValue (line 12) | def pGetPairValue(p):
  function pDoublePairValue (line 15) | def pDoublePairValue(p):

FILE: test-suite/golden-tests/memory-nested-misalign-cpp/foo.hpp
  type pair_br_t (line 7) | struct pair_br_t {
  type record_with_opt_t (line 12) | struct record_with_opt_t {
  function toNull (line 18) | std::optional<T> toNull(const T& x) {
  function makeOptRecord (line 22) | std::optional<pair_br_t> makeOptRecord(bool flag, double value) {
  function pair_br_t (line 26) | pair_br_t fromNullRecord(const pair_br_t& def, const std::optional<pair_...
  function sumRecordValues (line 31) | double sumRecordValues(const std::vector<pair_br_t>& records) {
  function record_with_opt_t (line 39) | record_with_opt_t makeRecordWithOpt(bool flag, const std::optional<doubl...
  function getRecordOpt (line 43) | std::optional<double> getRecordOpt(const record_with_opt_t& r) {
  function nestedRoundTrip (line 47) | std::optional<pair_br_t> nestedRoundTrip(const std::optional<pair_br_t>&...

FILE: test-suite/golden-tests/memory-nested-misalign-py/foo.py
  function toNull (line 1) | def toNull(x):
  function makeOptRecord (line 4) | def makeOptRecord(flag, value):
  function fromNullRecord (line 7) | def fromNullRecord(default_val, x):
  function sumRecordValues (line 12) | def sumRecordValues(records):
  function makeRecordWithOpt (line 15) | def makeRecordWithOpt(flag, opt):
  function getRecordOpt (line 18) | def getRecordOpt(r):
  function nestedRoundTrip (line 21) | def nestedRoundTrip(x):

FILE: test-suite/golden-tests/memory-optional-double-cpp/foo.hpp
  function toNull (line 7) | std::optional<T> toNull(const T& x) {
  function isNull (line 12) | bool isNull(const std::optional<T>& x) {
  function T (line 17) | T fromNull(const T& def, const std::optional<T>& x) {
  function doubleOptReal (line 22) | std::optional<double> doubleOptReal(const std::optional<double>& x) {
  function addOptInt (line 27) | std::optional<int> addOptInt(const std::optional<int>& x, const std::opt...

FILE: test-suite/golden-tests/memory-optional-double-py/foo.py
  function toNull (line 1) | def toNull(x):
  function isNull (line 4) | def isNull(x):
  function fromNull (line 7) | def fromNull(default_val, x):
  function doubleOptReal (line 12) | def doubleOptReal(x):
  function addOptInt (line 17) | def addOptInt(x, y):

FILE: test-suite/golden-tests/memory-record-pack-cpp/foo.hpp
  type pair_br_t (line 4) | struct pair_br_t {
  type triple_bir_t (line 9) | struct triple_bir_t {
  function pair_br_t (line 15) | pair_br_t makePair(bool flag, double value) {
  function getPairFlag (line 19) | bool getPairFlag(const pair_br_t& p) {
  function getPairValue (line 23) | double getPairValue(const pair_br_t& p) {
  function pair_br_t (line 27) | pair_br_t pairRoundTrip(const pair_br_t& p) {
  function triple_bir_t (line 31) | triple_bir_t makeTriple(bool flag, int count, double value) {
  function getTripleCount (line 35) | int getTripleCount(const triple_bir_t& t) {
  function getTripleValue (line 39) | double getTripleValue(const triple_bir_t& t) {
  function triple_bir_t (line 43) | triple_bir_t tripleRoundTrip(const triple_bir_t& t) {

FILE: test-suite/golden-tests/memory-record-pack-py/foo.py
  function makePair (line 1) | def makePair(flag, value):
  function getPairFlag (line 4) | def getPairFlag(p):
  function getPairValue (line 7) | def getPairValue(p):
  function pairRoundTrip (line 10) | def pairRoundTrip(p):
  function makeTriple (line 13) | def makeTriple(flag, count, value):
  function getTripleCount (line 16) | def getTripleCount(t):
  function getTripleValue (line 19) | def getTripleValue(t):
  function tripleRoundTrip (line 22) | def tripleRoundTrip(t):

FILE: test-suite/golden-tests/memory-split-block-cpp/foo.hpp
  function cNotBool (line 6) | bool cNotBool(bool x) {
  function cAppendStr (line 10) | std::string cAppendStr(const std::string& a, const std::string& b) {
  function cBoolToStr (line 14) | std::string cBoolToStr(bool x) {
  function cStrLen (line 18) | int cStrLen(const std::string& s) {

FILE: test-suite/golden-tests/memory-split-block-cpp/foo.py
  function pNotBool (line 1) | def pNotBool(x):
  function pAppendStr (line 4) | def pAppendStr(a, b):
  function pBoolToStr (line 7) | def pBoolToStr(x):

FILE: test-suite/golden-tests/module-form-011/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-01n/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-0n0/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-0n1/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-101/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-10n/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-110/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-111/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-1n0/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-n00/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-n01/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/module-form-n10/foo.py
  function foo (line 1) | def foo(x,y):

FILE: test-suite/golden-tests/multiple-instances-1-c/rms.h
  function rms1 (line 11) | double rms1(std::vector<double> xs){
  function rms2 (line 20) | double rms2(std::vector<double> xs){

FILE: test-suite/golden-tests/multiple-instances-1-py/rms.py
  function rms1 (line 3) | def rms1(xs):
  function rms2 (line 6) | def rms2(xs):

FILE: test-suite/golden-tests/multiple-instances-2-c/rms.h
  function rms1 (line 11) | double rms1(std::vector<double> xs){
  function rms2 (line 20) | double rms2(std::vector<double> xs){
  function mean (line 28) | double mean(std::vector<double> xs){

FILE: test-suite/golden-tests/multiple-instances-2-py/rms.py
  function rms1 (line 3) | def rms1(xs):
  function rms2 (line 6) | def rms2(xs):
  function mean (line 13) | def mean(xs):

FILE: test-suite/golden-tests/multiple-instances-2-r/rms.py
  function rms1 (line 3) | def rms1(xs):
  function rms2 (line 6) | def rms2(xs):

FILE: test-suite/golden-tests/multiprocessing-py-1/foo.py
  function pmap (line 6) | def pmap(f, xs):
  function add (line 11) | def add(x, y):

FILE: test-suite/golden-tests/nat-typecheck/src.hpp
  function ones34 (line 9) | mlc::Tensor2<double> ones34() {
  function ones23 (line 15) | mlc::Tensor2<double> ones23() {
  function ones32 (line 21) | mlc::Tensor2<double> ones32() {
  function ones22 (line 27) | mlc::Tensor2<double> ones22() {
  function ones43 (line 33) | mlc::Tensor2<double> ones43() {
  function ones56 (line 39) | mlc::Tensor2<double> ones56() {
  function onesV3 (line 45) | mlc::Tensor1<double> onesV3() {
  function onesV4 (line 51) | mlc::Tensor1<double> onesV4() {
  function onesV5 (line 57) | mlc::Tensor1<double> onesV5() {
  function onesV10 (line 63) | mlc::Tensor1<double> onesV10() {
  function eye33 (line 69) | mlc::Tensor2<double> eye33() {
  function eye55 (line 76) | mlc::Tensor2<double> eye55() {
  function add2d (line 85) | mlc::Tensor2<double> add2d(
  function transpose2d (line 96) | mlc::Tensor2<double> transpose2d(const mlc::Tensor2<double>& a) {
  function matmul2d (line 105) | mlc::Tensor2<double> matmul2d(
  function dot1d (line 119) | double dot1d(
  function tsum1d (line 129) | double tsum1d(const mlc::Tensor1<double>& a) {
  function trace2d (line 135) | double trace2d(const mlc::Tensor2<double>& a) {
  function diag2d (line 142) | mlc::Tensor1<double> diag2d(const mlc::Tensor2<double>& a) {
  function diagMat1d (line 149) | mlc::Tensor2<double> diagMat1d(const mlc::Tensor1<double>& a) {
  function flatten2d (line 157) | mlc::Tensor1<double> flatten2d(const mlc::Tensor2<double>& a) {
  function outer1d (line 164) | mlc::Tensor2<double> outer1d(
  function vstack2d (line 176) | mlc::Tensor2<double> vstack2d(
  function hstack2d (line 187) | mlc::Tensor2<double> hstack2d(
  function kron2d (line 202) | mlc::Tensor2<double> kron2d(
  function slice2d (line 217) | mlc::Tensor2<double> slice2d(
  function ttake1d (line 228) | mlc::Tensor1<double> ttake1d(int n, const mlc::Tensor1<double>& a) {

FILE: test-suite/golden-tests/native-morloc-2/foo.py
  function add (line 1) | def add(x, y):

FILE: test-suite/golden-tests/native-morloc-3/foo.py
  function mlc_map (line 1) | def mlc_map(f, xs):

FILE: test-suite/golden-tests/native-morloc-5/high.py
  function fst (line 1) | def fst(x):
  function snd (line 4) | def snd(x):

FILE: test-suite/golden-tests/native-morloc-6/foo.py
  function morloc_id (line 1) | def morloc_id(x):
  function morloc_map (line 4) | def morloc_map(f, xs):

FILE: test-suite/golden-tests/null-keyword/main.hpp
  function T (line 7) | T fromNull(const T& default_val, const std::optional<T>& x) {

FILE: test-suite/golden-tests/null-keyword/main.py
  function fromNull (line 1) | def fromNull(default_val, x):

FILE: test-suite/golden-tests/object-1-py/person.py
  class PersonObj (line 1) | class PersonObj:
    method __init__ (line 2) | def __init__(self, name, info):

FILE: test-suite/golden-tests/optional-coerce-cpp/foo.hpp
  function T (line 7) | T fromNull(const T& default_val, const std::optional<T>& x) {
  function T (line 13) | T fromNull(const T& default_val, std::nullopt_t) {
  function T (line 18) | T fromNull(const T&, const T& x) {
  function addOpt (line 22) | std::optional<int> addOpt(const std::optional<int>& x, const std::option...
  function identity (line 27) | std::optional<int> identity(const std::optional<int>& x) {

FILE: test-suite/golden-tests/optional-coerce-interop/cfoo.hpp
  function cAddOne (line 4) | int cAddOne(int x) {

FILE: test-suite/golden-tests/optional-coerce-interop/pfoo.py
  function pUnwrapOr (line 1) | def pUnwrapOr(default_val, x):

FILE: test-suite/golden-tests/optional-coerce-py/foo.py
  function fromNull (line 1) | def fromNull(default_val, x):
  function addOpt (line 6) | def addOpt(x, y):
  function identity (line 11) | def identity(x):

FILE: test-suite/golden-tests/optional-cpp/foo.hpp
  function isNull (line 9) | bool isNull(const std::optional<T>& x) {
  function T (line 14) | T fromNull(const T& default_val, const std::optional<T>& x) {
  function T (line 20) | T fromNull(const T& default_val, std::nullopt_t) {
  function toNull (line 25) | std::optional<T> toNull(const T& x) {
  function safeHead (line 29) | std::optional<int> safeHead(const std::vector<int>& xs) {
  function optionalAdd (line 34) | std::optional<int> optionalAdd(const std::optional<int>& x, const std::o...
  function optionalList (line 39) | std::vector<std::optional<int>> optionalList(const std::vector<int>& xs) {
  function countNulls (line 49) | int countNulls(const std::vector<std::optional<int>>& xs) {

FILE: test-suite/golden-tests/optional-interop-cp/foo.hpp
  function cSafeDiv (line 6) | std::optional<int> cSafeDiv(int x, int y) {
  function cFromNull (line 11) | int cFromNull(int default_val, const std::optional<int>& x) {
  function cDouble (line 16) | std::optional<int> cDouble(const std::optional<int>& x) {

FILE: test-suite/golden-tests/optional-interop-cp/foo.py
  function pSafeDiv (line 1) | def pSafeDiv(x, y):
  function pFromNull (line 6) | def pFromNull(default_val, x):
  function pDouble (line 11) | def pDouble(x):

FILE: test-suite/golden-tests/optional-interop-pr/foo.py
  function pSafeDiv (line 1) | def pSafeDiv(x, y):
  function pFromNull (line 6) | def pFromNull(default_val, x):
  function pDouble (line 11) | def pDouble(x):

FILE: test-suite/golden-tests/optional-interop-rc/foo.hpp
  function cSafeDiv (line 6) | std::optional<int> cSafeDiv(int x, int y) {
  function cFromNull (line 11) | int cFromNull(int default_val, const std::optional<int>& x) {
  function cDouble (line 16) | std::optional<int> cDouble(const std::optional<int>& x) {

FILE: test-suite/golden-tests/optional-json/foo.py
  function identity (line 1) | def identity(x):
  function fromNull (line 4) | def fromNull(default_val, x):
  function isNull (line 9) | def isNull(x):

FILE: test-suite/golden-tests/optional-py/foo.py
  function isNull (line 1) | def isNull(x):
  function fromNull (line 4) | def fromNull(default_val, x):
  function toNull (line 9) | def toNull(x):
  function safeHead (line 12) | def safeHead(xs):
  function optionalAdd (line 17) | def optionalAdd(x, y):
  function optionalList (line 22) | def optionalList(xs):
  function countNulls (line 25) | def countNulls(xs):

FILE: test-suite/golden-tests/optional-records-cpp/foo.hpp
  type person_t (line 8) | struct person_t {
  function person_t (line 13) | person_t makePerson(const std::string& name, const std::optional<int>& a...
  function getName (line 17) | std::string getName(const person_t& p) {
  function getAge (line 21) | std::optional<int> getAge(const person_t& p) {
  function toNull (line 26) | std::optional<T> toNull(const T& x) {
  function findPerson (line 30) | std::optional<person_t> findPerson(const std::string& name, const std::v...

FILE: test-suite/golden-tests/optional-records-py/foo.py
  function makePerson (line 1) | def makePerson(name, age):
  function getName (line 4) | def getName(p):
  function getAge (line 7) | def getAge(p):
  function toNull (line 10) | def toNull(x):
  function findPerson (line 13) | def findPerson(name, people):

FILE: test-suite/golden-tests/packer-definitions-1/foo.py
  function foo (line 3) | def foo(name):
  function packJsonObj (line 7) | def packJsonObj(json_str):
  function unpackJsonObj (line 11) | def unpackJsonObj(json_obj):

FILE: test-suite/golden-tests/packer-definitions-2/foo.py
  function foo (line 1) | def foo(name):

FILE: test-suite/golden-tests/packer-definitions-2/lib/json/json.py
  function packJsonObj (line 4) | def packJsonObj(json_str):
  function unpackJsonObj (line 8) | def unpackJsonObj(json_obj):

FILE: test-suite/golden-tests/packer-definitions-3/dumby.hpp
  function h (line 9) | double h(F f, std::string x){

FILE: test-suite/golden-tests/packer-definitions-3/dumby.py
  function f (line 2) | def f(x):

FILE: test-suite/golden-tests/packer-definitions-4/dumby.hpp
  function fcpp (line 5) | double fcpp(double x){

FILE: test-suite/golden-tests/packer-definitions-4/dumby.py
  function fpy (line 2) | def fpy(x):

FILE: test-suite/golden-tests/packer-definitions-5/map.hpp
  function morloc_packMap (line 10) | std::map<A,B> morloc_packMap(std::tuple<std::vector<A>,std::vector<B>> i...
  function morloc_unpackMap (line 22) | std::tuple<std::vector<A>,std::vector<B>> morloc_unpackMap(std::map<A,B>...
  function insert (line 33) | std::map<A,B> insert(std::map<A,B> m, A a, B b){

FILE: test-suite/golden-tests/packer-definitions-5/map.py
  function packMap (line 1) | def packMap(xs):
  function unpackMap (line 4) | def unpackMap(d):
  function singleton (line 7) | def singleton(k, v):

FILE: test-suite/golden-tests/packets-interop/foo.py
  function pid (line 1) | def pid(x):

FILE: test-suite/golden-tests/packets-large/foo.py
  function pid (line 1) | def pid(x):

FILE: test-suite/golden-tests/path-shadowing-c/bar/main.hpp
  function add (line 4) | double add (double x, double y){

FILE: test-suite/golden-tests/path-shadowing-c/baz/main.hpp
  function mul (line 4) | double mul (double x, double y){

FILE: test-suite/golden-tests/path-shadowing-py/bar/main.py
  function add (line 1) | def add (x, y):

FILE: test-suite/golden-tests/path-shadowing-py/baz/main.py
  function mul (line 1) | def mul (x, y):

FILE: test-suite/golden-tests/pattern-setters/types.hpp
  type location_t (line 3) | struct location_t {
  type worker_t (line 9) | struct worker_t {

FILE: test-suite/golden-tests/poly-list-1/foo.hpp
  function appendList (line 11) | std::vector<T> appendList(std::vector<T> a, std::vector<T> b) {
  function T (line 17) | T listAt(int i, std::vector<T> xs) {
  function listCons (line 22) | std::vector<T> listCons(T x, std::vector<T> xs) {
  function listUncons (line 28) | std::tuple<T, std::vector<T>> listUncons(std::vector<T> xs) {
  function listSnoc (line 35) | std::vector<T> listSnoc(std::vector<T> xs, T x) {
  function listUnsnoc (line 41) | std::tuple<std::vector<T>, T> listUnsnoc(std::vector<T> xs) {
  function appendDeque (line 50) | std::deque<T> appendDeque(std::deque<T> a, std::deque<T> b) {
  function dequeCons (line 56) | std::deque<T> dequeCons(T x, std::deque<T> xs) {
  function dequeUncons (line 62) | std::tuple<T, std::deque<T>> dequeUncons(std::deque<T> xs) {
  function dequeSnoc (line 69) | std::deque<T> dequeSnoc(std::deque<T> xs, T x) {
  function dequeUnsnoc (line 75) | std::tuple<std::deque<T>, T> dequeUnsnoc(std::deque<T> xs) {

FI
Condensed preview — 2281 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,479K chars).
[
  {
    "path": ".dockerignore",
    "chars": 169,
    "preview": "# Ignore build artifacts to keep Docker context small\n.stack-work/\n.git/\nout/\ncontainer/static-build/.stack-work/\nmorloc"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 8443,
    "preview": "# Release workflow: build all binaries + containers, run tests, publish release.\n#\n# Triggered by pushing a version tag:"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 2800,
    "preview": "name: Test Morloc\non: [push]\n\njobs:\n  linux-test:\n    runs-on: ubuntu-latest\n    timeout-minutes: 60\n\n    env:\n      DEB"
  },
  {
    "path": ".gitignore",
    "chars": 218,
    "preview": "tags\n*.hi\n*.o\n.stack-work/\n.history\nmorloc.cabal\n*.out\nrun/\n.idea/\n*.iml\n# ignore debugging files\n*.aux\n*.hp\n*.prof\n*.ps"
  },
  {
    "path": "ChangeLog.md",
    "chars": 28904,
    "preview": "0.81.0 [2026-94-22]\n-------------------\n * fix type inference for type families\n * extend intrinsic support for language"
  },
  {
    "path": "LICENSE",
    "chars": 11323,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 3969,
    "preview": "<p align=\"center\">\n  <a href=\"https://github.com/morloc-project/morloc/actions/workflows/.test.yml\">\n    <img src=\"https"
  },
  {
    "path": "bench/Bench.hs",
    "chars": 3010,
    "preview": "{-|\nModule      : Bench\nDescription : Benchmark suite for morloc compiler\nCopyright   : (c) Zebulun Arendsee, 2016-2026\n"
  },
  {
    "path": "bench/test-data/complex-types.loc",
    "chars": 167,
    "preview": "module complex (processRecords)\n\ntype Record = {id :: Int, name :: Str, values :: [Real]}\n\nprocessRecords :: [Record] ->"
  },
  {
    "path": "bench/test-data/interop.loc",
    "chars": 123,
    "preview": "module interop (processList)\n\nimport math (sqrt from python)\n\nprocessList :: [Real] -> [Real]\nprocessList xs = map sqrt "
  },
  {
    "path": "bench/test-data/simple.loc",
    "chars": 109,
    "preview": "module simple (add, mul)\n\nadd :: Int -> Int -> Int\nadd x y = x + y\n\nmul :: Int -> Int -> Int\nmul x y = x * y\n"
  },
  {
    "path": "container/Makefile",
    "chars": 3360,
    "preview": "# Pushing to the github registry requires a personal token with package\n# permissions. Login is required, for example:\n#"
  },
  {
    "path": "container/full/Dockerfile",
    "chars": 2076,
    "preview": "# Copy the morloc binary from the matching tiny image\nARG MORLOC_VERSION=edge\nFROM ghcr.io/morloc-project/morloc/morloc-"
  },
  {
    "path": "container/full/assets/README",
    "chars": 286,
    "preview": "This container has a full morloc installation and language support for R, Python3, and C++.\n\nThe ~/tests folder contains"
  },
  {
    "path": "container/full/assets/bashrc",
    "chars": 1862,
    "preview": "# basic morloc bashrc\n\n# If not running interactively, don't do anything\ncase $- in\n    *i*) ;;\n      *) return;;\nesac\n\n"
  },
  {
    "path": "container/full/assets/vimrc",
    "chars": 701,
    "preview": "\" Jump to the last position when reopening a file\nau BufReadPost * if line(\"'\\\"\") > 1 && line(\"'\\\"\") <= line(\"$\") | exe "
  },
  {
    "path": "container/static-build/Dockerfile",
    "chars": 5388,
    "preview": "# Portable build of libmorloc.so, morloc-nexus, and morloc-manager.\n#\n# Strategy:\n#   - libmorloc.so: shared library bui"
  },
  {
    "path": "container/static-build/build.sh",
    "chars": 1186,
    "preview": "#!/bin/sh\n# Build portable libmorloc.so, morloc-nexus, and morloc-manager.\n#\n# Usage:\n#   ./container/static-build/build"
  },
  {
    "path": "container/test/Dockerfile",
    "chars": 1669,
    "preview": "FROM docker.io/library/ubuntu:24.04\n\nENV DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update && apt-get install -y \\\n  gi"
  },
  {
    "path": "container/test/assets/bashrc",
    "chars": 1738,
    "preview": "# basic morloc bashrc\n\n# If not running interactively, don't do anything\ncase $- in\n    *i*) ;;\n      *) return;;\nesac\n\n"
  },
  {
    "path": "container/tiny/Dockerfile",
    "chars": 2711,
    "preview": "###############################################################################\n# Stage 1: Build the morloc compiler fro"
  },
  {
    "path": "data/lang/c/lang.yaml",
    "chars": 133,
    "preview": "# C language metadata for morloc compiler\nname: c\nextension: c\naliases: []\nis_compiled: true\nrun_command: []\nserial_type"
  },
  {
    "path": "data/lang/cpp/cppmorloc.cpp",
    "chars": 2315,
    "preview": "#include <stdexcept>\n#include <string>\n#include <cstdlib>\n\n#include \"morloc.h\"\n\nabsptr_t cpp_rel2abs(relptr_t ptr){\n    "
  },
  {
    "path": "data/lang/cpp/cppmorloc.hpp",
    "chars": 25344,
    "preview": "#ifndef __CPPMORLOC_HPP__\n#define __CPPMORLOC_HPP__\n\n#include <vector>\n#include <stack>\n#include <list>\n#include <forwar"
  },
  {
    "path": "data/lang/cpp/init.sh",
    "chars": 1164,
    "preview": "#!/bin/bash\nset -e\n\nMORLOC_HOME=\"$1\"\nBUILD_DIR=\"$2\"\nSANITIZE_FLAGS=\"$3\"\nINCLUDE_DIR=\"$MORLOC_HOME/include\"\nLIB_DIR=\"$MOR"
  },
  {
    "path": "data/lang/cpp/lang.yaml",
    "chars": 152,
    "preview": "# C++ language metadata for morloc compiler\nname: cpp\nextension: cpp\naliases: [\"c++\"]\nis_compiled: true\nrun_command: []\n"
  },
  {
    "path": "data/lang/cpp/mlc_arrow.hpp",
    "chars": 4272,
    "preview": "#ifndef MLC_ARROW_HPP\n#define MLC_ARROW_HPP\n\n// mlc_arrow.hpp -- thin RAII wrapper around Arrow C Data Interface structs"
  },
  {
    "path": "data/lang/cpp/mlc_tensor.hpp",
    "chars": 5555,
    "preview": "#ifndef MLC_TENSOR_HPP\n#define MLC_TENSOR_HPP\n\n// mlc_tensor.hpp -- dense N-dimensional tensor for morloc C++ pools.\n// "
  },
  {
    "path": "data/lang/cpp/morloc_pch.hpp",
    "chars": 880,
    "preview": "// Precompiled header for morloc C++ pools.\n// Compiled once during 'morloc init', reused for every pool compilation.\n\n#"
  },
  {
    "path": "data/lang/cpp/nanoarrow/nanoarrow.c",
    "chars": 144194,
    "preview": "// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements.  See the NOTICE"
  },
  {
    "path": "data/lang/cpp/nanoarrow/nanoarrow.h",
    "chars": 169451,
    "preview": "// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements.  See the NOTICE"
  },
  {
    "path": "data/lang/cpp/pool.cpp",
    "chars": 16480,
    "preview": "#include <string>\n#include <iostream>\n#include <sstream>\n#include <functional>\n#include <vector>\n#include <algorithm>\n#i"
  },
  {
    "path": "data/lang/julia/MorlocRuntime.jl",
    "chars": 10914,
    "preview": "\"\"\"\n    MorlocRuntime\n\nJulia runtime module for morloc. Provides IPC (daemon lifecycle, packet I/O),\nmsgpack-based seria"
  },
  {
    "path": "data/lang/julia/init.sh",
    "chars": 582,
    "preview": "#!/bin/bash\nset -e\n\nMORLOC_HOME=\"$1\"\nBUILD_DIR=\"$2\"\nSANITIZE_FLAGS=\"$3\"\nINCLUDE_DIR=\"$MORLOC_HOME/include\"\nLIB_DIR=\"$MOR"
  },
  {
    "path": "data/lang/julia/juliabridge.c",
    "chars": 6047,
    "preview": "/* juliabridge.c -- Thin C bridge between Julia and libmorloc.\n *\n * Compiled to libjuliamorloc.so, called from Julia vi"
  },
  {
    "path": "data/lang/julia/lang.yaml",
    "chars": 2051,
    "preview": "# Julia language descriptor for morloc compiler\n# Metadata fields (read by LangRegistry) + descriptor fields (read by ge"
  },
  {
    "path": "data/lang/julia/pool.jl",
    "chars": 2897,
    "preview": "# Morloc Julia pool template\n# Single-threaded daemon: accepts one connection at a time.\n\n# Add morloc runtime to load p"
  },
  {
    "path": "data/lang/languages.yaml",
    "chars": 525,
    "preview": "# Pairwise language costs for the morloc optimizer\n#\n# Same-language function overhead (intra-language call cost)\nsame_l"
  },
  {
    "path": "data/lang/py/Makefile",
    "chars": 78,
    "preview": "all:\n\tpython3 setup.py build_ext --inplace\n\tcp -fs pymorloc.cpython* pymorloc\n"
  },
  {
    "path": "data/lang/py/init.sh",
    "chars": 445,
    "preview": "#!/bin/bash\nset -e\n\nexport MORLOC_HOME=\"$1\"\nBUILD_DIR=\"$2\"\nSANITIZE_FLAGS=\"$3\"\nOPT_DIR=\"$MORLOC_HOME/opt\"\n\n# Clean stale"
  },
  {
    "path": "data/lang/py/lang.yaml",
    "chars": 2403,
    "preview": "# Python language descriptor for morloc compiler\n# Metadata fields (read by LangRegistry) + descriptor fields (read by g"
  },
  {
    "path": "data/lang/py/pool.py",
    "chars": 12706,
    "preview": "import signal\nimport sys\nimport select\nimport os # required for setting path to morloc dependencies\nimport time\nimport c"
  },
  {
    "path": "data/lang/py/pymorloc.c",
    "chars": 65224,
    "preview": "#define PY_SSIZE_T_CLEAN\n#include \"morloc.h\"\n#include \"Python.h\"\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib."
  },
  {
    "path": "data/lang/py/setup.py",
    "chars": 737,
    "preview": "import os\nfrom setuptools import setup, Extension\nimport numpy as np\n\ntry:\n    np_include_path = np.get_include()\nexcept"
  },
  {
    "path": "data/lang/r/init.sh",
    "chars": 1365,
    "preview": "#!/bin/bash\nset -e\n\nMORLOC_HOME=\"$1\"\nBUILD_DIR=\"$2\"\nSANITIZE_FLAGS=\"$3\"\nINCLUDE_DIR=\"$MORLOC_HOME/include\"\nLIB_DIR=\"$MOR"
  },
  {
    "path": "data/lang/r/lang.yaml",
    "chars": 2594,
    "preview": "# R language descriptor for morloc compiler\n# Metadata fields (read by LangRegistry) + descriptor fields (read by generi"
  },
  {
    "path": "data/lang/r/pool.R",
    "chars": 8686,
    "preview": "# AUTO include sources start\n# <<<BREAK>>>\n# AUTO include sources end\n\nmorloc_is_ping                       <- function("
  },
  {
    "path": "data/lang/r/rmorloc.c",
    "chars": 80885,
    "preview": "#include <R.h>\n#include <Rinternals.h>\n#include <Rdefines.h>\n#include <R_ext/Arith.h>\n\n#include <stdint.h>\n#include <std"
  },
  {
    "path": "data/misc/mlccpptypes.hpp",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "data/morloc/morloc.h",
    "chars": 33305,
    "preview": "// morloc.h -- C ABI contract for libmorloc.so\n//\n// This is the single public header for consumers of the morloc runtim"
  },
  {
    "path": "data/rust/.gitignore",
    "chars": 8,
    "preview": "target/\n"
  },
  {
    "path": "data/rust/Cargo.toml",
    "chars": 441,
    "preview": "[workspace]\nmembers = [\"morloc-manifest\", \"morloc-runtime\", \"morloc-nexus\", \"morloc-manager\"]\nresolver = \"2\"\n\n[workspace"
  },
  {
    "path": "data/rust/morloc-manager/Cargo.toml",
    "chars": 523,
    "preview": "[package]\nname = \"morloc-manager\"\nversion = \"0.23.1\"\nedition = \"2021\"\ndescription = \"Container lifecycle manager for Mor"
  },
  {
    "path": "data/rust/morloc-manager/src/config.rs",
    "chars": 8758,
    "preview": "use std::fs;\nuse std::os::unix::fs::{OpenOptionsExt, PermissionsExt};\nuse std::path::{Path, PathBuf};\nuse std::process::"
  },
  {
    "path": "data/rust/morloc-manager/src/container.rs",
    "chars": 14057,
    "preview": "use std::io;\nuse std::process::{Command, ExitStatus, Stdio};\n\nuse crate::types::ContainerEngine;\n\n// ==================="
  },
  {
    "path": "data/rust/morloc-manager/src/doctor.rs",
    "chars": 16899,
    "preview": "use std::fs;\nuse std::path::Path;\nuse std::process::Command;\n\nuse crate::config as cfg;\nuse crate::container::{container"
  },
  {
    "path": "data/rust/morloc-manager/src/environment.rs",
    "chars": 26053,
    "preview": "use std::fs;\nuse std::path::{Path, PathBuf};\nuse std::process::Command;\n\nuse serde::Serialize;\nuse sha2::{Digest, Sha256"
  },
  {
    "path": "data/rust/morloc-manager/src/error.rs",
    "chars": 2156,
    "preview": "use std::fmt;\nuse thiserror::Error;\n\nuse crate::types::{ContainerEngine, Scope, Version};\n\n#[derive(Debug, Error, Partia"
  },
  {
    "path": "data/rust/morloc-manager/src/freeze.rs",
    "chars": 9191,
    "preview": "use std::fs;\nuse std::path::Path;\nuse std::process::{Command, Stdio};\n\nuse chrono::Utc;\nuse sha2::{Digest, Sha256};\nuse "
  },
  {
    "path": "data/rust/morloc-manager/src/main.rs",
    "chars": 106831,
    "preview": "mod config;\nmod container;\nmod doctor;\nmod environment;\nmod error;\nmod freeze;\nmod selinux;\nmod serve;\nmod types;\n\nuse s"
  },
  {
    "path": "data/rust/morloc-manager/src/selinux.rs",
    "chars": 2185,
    "preview": "use std::path::Path;\nuse std::process::Command;\n\nuse crate::error::{ManagerError, Result};\n\n#[derive(Debug, Clone, Copy,"
  },
  {
    "path": "data/rust/morloc-manager/src/serve.rs",
    "chars": 27319,
    "preview": "use std::fs;\nuse std::path::Path;\nuse std::process::{Command, Stdio};\nuse std::thread;\nuse std::time::Duration;\n\nuse cra"
  },
  {
    "path": "data/rust/morloc-manager/src/types.rs",
    "chars": 8554,
    "preview": "use serde::{Deserialize, Deserializer, Serialize, Serializer};\nuse std::cmp::Ordering;\nuse std::str::FromStr;\n\n// ======"
  },
  {
    "path": "data/rust/morloc-manifest/Cargo.toml",
    "chars": 662,
    "preview": "[package]\nname = \"morloc-manifest\"\nversion = \"0.81.0\"\nedition = \"2021\"\ndescription = \"Morloc manifest schema (v2): share"
  },
  {
    "path": "data/rust/morloc-manifest/src/lib.rs",
    "chars": 34269,
    "preview": "//! Morloc manifest schema (v2) -- canonical Rust types.\n//!\n//! The morloc compiler emits a `.manifest` JSON blob descr"
  },
  {
    "path": "data/rust/morloc-nexus/Cargo.toml",
    "chars": 834,
    "preview": "[package]\nname = \"morloc-nexus\"\nversion = \"0.81.0\"\nedition = \"2021\"\ndescription = \"Morloc nexus: CLI dispatcher for mult"
  },
  {
    "path": "data/rust/morloc-nexus/build.rs",
    "chars": 1281,
    "preview": "fn main() {\n    // Use MORLOC_HOME at build time if set, else fall back to $HOME default.\n    // This is only for the co"
  },
  {
    "path": "data/rust/morloc-nexus/src/dispatch.rs",
    "chars": 49696,
    "preview": "//! Command dispatch: CLI argument parsing and routing to pools.\n//!\n//! Replaces the dispatch_command, dispatch, run_co"
  },
  {
    "path": "data/rust/morloc-nexus/src/help.rs",
    "chars": 20595,
    "preview": "//! Help text generation matching the C nexus output format.\n\nuse crate::manifest::{Arg, Command, GroupEntry, Manifest};"
  },
  {
    "path": "data/rust/morloc-nexus/src/main.rs",
    "chars": 20834,
    "preview": "//! Morloc Nexus: CLI dispatcher for multi-language pool orchestration.\n//!\n//! Replaces data/nexus.c. Entry point for a"
  },
  {
    "path": "data/rust/morloc-nexus/src/manifest.rs",
    "chars": 560,
    "preview": "//! Manifest types -- thin re-export shim over the canonical schema\n//! definitions in the `morloc-manifest` crate.\n//!\n"
  },
  {
    "path": "data/rust/morloc-nexus/src/process.rs",
    "chars": 15865,
    "preview": "//! Pool daemon process management, signal handling, and lifecycle.\n//!\n//! Replaces the fork/exec, SIGCHLD, SIGTERM, cl"
  },
  {
    "path": "data/rust/morloc-runtime/Cargo.toml",
    "chars": 928,
    "preview": "[package]\nname = \"morloc-runtime\"\nversion = \"0.81.0\"\nedition = \"2021\"\ndescription = \"Morloc runtime library: shared memo"
  },
  {
    "path": "data/rust/morloc-runtime/build.rs",
    "chars": 395,
    "preview": "fn main() {\n    let target = std::env::var(\"TARGET\").unwrap_or_default();\n    println!(\"cargo:rustc-link-lib=pthread\");\n"
  },
  {
    "path": "data/rust/morloc-runtime/cbindgen.toml",
    "chars": 237,
    "preview": "language = \"C\"\nheader = \"/* Generated by cbindgen - do not edit manually */\"\nautogen_warning = \"\"\ninclude_version = fals"
  },
  {
    "path": "data/rust/morloc-runtime/src/arrow_ffi.rs",
    "chars": 23351,
    "preview": "//! Arrow C Data Interface implementation.\n//! Replaces arrow.c. Provides SHM ↔ Arrow conversion.\n\nuse std::ffi::{c_char"
  },
  {
    "path": "data/rust/morloc-runtime/src/cache.rs",
    "chars": 11840,
    "preview": "//! File-based packet caching with xxHash keys.\n//! Replaces cache.c.\n\nuse std::ffi::{c_char, c_void, CStr, CString};\nus"
  },
  {
    "path": "data/rust/morloc-runtime/src/cli.rs",
    "chars": 27582,
    "preview": "//! CLI argument handling and voidstar utility functions.\n//! Replaces cli.c.\n\nuse std::ffi::{c_char, c_void, CStr};\nuse"
  },
  {
    "path": "data/rust/morloc-runtime/src/cschema.rs",
    "chars": 5449,
    "preview": "//! C-compatible Schema type for FFI.\n//! This module is always compiled (even with no-ffi-exports feature).\n\nuse std::f"
  },
  {
    "path": "data/rust/morloc-runtime/src/daemon_ffi.rs",
    "chars": 60471,
    "preview": "//! C ABI wrappers for daemon subsystems.\n//! Replaces daemon.c. Uses serde_json, HashMap, VecDeque, and std::thread.\n\nu"
  },
  {
    "path": "data/rust/morloc-runtime/src/error.rs",
    "chars": 1270,
    "preview": "use std::ffi::{CString, c_char};\n\n#[derive(Debug, thiserror::Error)]\npub enum MorlocError {\n    #[error(\"shared memory e"
  },
  {
    "path": "data/rust/morloc-runtime/src/eval_ffi.rs",
    "chars": 30666,
    "preview": "//! Expression evaluator and constructor functions.\n//! Replaces eval.c. Uses HashMap instead of linked-list dict_t.\n\nus"
  },
  {
    "path": "data/rust/morloc-runtime/src/ffi.rs",
    "chars": 13276,
    "preview": "//! C ABI wrappers for libmorloc.so\n//!\n//! These `extern \"C\"` functions match the signatures in morloc.h.\n//! Internall"
  },
  {
    "path": "data/rust/morloc-runtime/src/hash.rs",
    "chars": 1488,
    "preview": "//! xxHash64 wrapper using the twox-hash crate.\n//! Replaces the 1500-line xxhash.h header.\n\nuse std::hash::Hasher;\nuse "
  },
  {
    "path": "data/rust/morloc-runtime/src/http_ffi.rs",
    "chars": 14966,
    "preview": "//! C ABI wrappers for HTTP request/response handling.\n//! Replaces http.c.\n\nuse std::ffi::{c_char, c_void};\nuse std::pt"
  },
  {
    "path": "data/rust/morloc-runtime/src/intrinsics.rs",
    "chars": 10393,
    "preview": "//! Intrinsic functions for morloc: save/load/show/read/hash.\n//! Replaces intrinsics.c. These are thin wrappers around "
  },
  {
    "path": "data/rust/morloc-runtime/src/ipc.rs",
    "chars": 3190,
    "preview": "//! Unix domain socket IPC for communication between nexus and language pools.\n//! Replaces ipc.c.\n\nuse crate::error::Mo"
  },
  {
    "path": "data/rust/morloc-runtime/src/ipc_ffi.rs",
    "chars": 19298,
    "preview": "//! C ABI wrappers for IPC functions.\n//! Replaces ipc.c with Rust implementations of Unix domain socket operations.\n\nus"
  },
  {
    "path": "data/rust/morloc-runtime/src/json.rs",
    "chars": 18178,
    "preview": "//! JSON <-> Voidstar conversion.\n//!\n//! # Safety model\n//!\n//! All SHM pointer operations are encapsulated in `ShmWrit"
  },
  {
    "path": "data/rust/morloc-runtime/src/json_ffi.rs",
    "chars": 11808,
    "preview": "//! C ABI wrappers for JSON functions.\n//! Replaces json.c's core functions with calls to Rust json.rs.\n//! Arrow output"
  },
  {
    "path": "data/rust/morloc-runtime/src/lib.rs",
    "chars": 1508,
    "preview": "pub mod error;\npub mod schema;\npub mod packet;\npub mod shm;\npub mod hash;\npub mod ipc;\npub mod json;\npub mod mpack;\n// F"
  },
  {
    "path": "data/rust/morloc-runtime/src/manifest_ffi.rs",
    "chars": 52988,
    "preview": "//! C ABI wrappers for manifest parsing and discovery JSON.\n//!\n//! This file mirrors the manifest data model into raw `"
  },
  {
    "path": "data/rust/morloc-runtime/src/mpack.rs",
    "chars": 22518,
    "preview": "//! MessagePack <-> Voidstar conversion.\n//!\n//! Replaces serialize.c + mpack.c. Uses the `rmp` crate for MessagePack I/"
  },
  {
    "path": "data/rust/morloc-runtime/src/packet.rs",
    "chars": 23461,
    "preview": "use crate::error::MorlocError;\n\n// ── Magic & version constants ──────────────────────────────────────────────\n\npub cons"
  },
  {
    "path": "data/rust/morloc-runtime/src/packet_ffi.rs",
    "chars": 34482,
    "preview": "//! C ABI wrappers for packet functions.\n//! Replaces packet.c with calls to Rust packet.rs + voidstar.rs.\n\nuse std::ffi"
  },
  {
    "path": "data/rust/morloc-runtime/src/pool_ffi.rs",
    "chars": 22437,
    "preview": "//! Pool server lifecycle: accept connections, dispatch packets, manage workers.\n//! Replaces pool.c. Uses std::thread i"
  },
  {
    "path": "data/rust/morloc-runtime/src/router_ffi.rs",
    "chars": 49832,
    "preview": "//! C ABI wrappers for router subsystems.\n//! Replaces router.c. Routes requests to per-program daemons.\n\nuse std::ffi::"
  },
  {
    "path": "data/rust/morloc-runtime/src/schema.rs",
    "chars": 22392,
    "preview": "use crate::error::MorlocError;\n\n/// Morloc serial type identifiers, matching the C enum morloc_serial_type.\n#[derive(Deb"
  },
  {
    "path": "data/rust/morloc-runtime/src/shm.rs",
    "chars": 32926,
    "preview": "//! Shared memory management with multi-volume support.\n//!\n//! Replaces shm.c / memory.h. Uses AtomicU32 + futex for cr"
  },
  {
    "path": "data/rust/morloc-runtime/src/slurm_ffi.rs",
    "chars": 19976,
    "preview": "//! C ABI wrappers for SLURM job submission.\n//! Replaces slurm.c.\n\nuse std::ffi::{c_char, c_void, CStr, CString};\nuse s"
  },
  {
    "path": "data/rust/morloc-runtime/src/utility.rs",
    "chars": 10801,
    "preview": "//! File I/O and string utility functions.\n//! Replaces utility.c.\n\nuse std::ffi::{c_char, c_void, CStr};\nuse std::io::W"
  },
  {
    "path": "data/rust/morloc-runtime/src/voidstar.rs",
    "chars": 9822,
    "preview": "//! Shared voidstar operations: relptr adjustment, binary serialization,\n//! schema-aware free, and flatten-to-buffer.\n/"
  },
  {
    "path": "exe/morloc-codegen-generic/Main.hs",
    "chars": 2598,
    "preview": "{- |\nModule      : Main\nDescription : Generic pool code generator for morloc\nCopyright   : (c) Zebulun Arendsee, 2016-20"
  },
  {
    "path": "executable/CppPrinter.hs",
    "chars": 10290,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE QuasiQuotes #-}\n{-# LANGUAGE TemplateHaskell #-}\n\n{- |\nModule      : Cpp"
  },
  {
    "path": "executable/CppTranslator.hs",
    "chars": 31934,
    "preview": "{-# LANGUAGE FlexibleContexts #-}\n{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE Qua"
  },
  {
    "path": "executable/Main.hs",
    "chars": 379,
    "preview": "{- |\nModule      : Main\nDescription : Executable main module\nCopyright   : (c) Zebulun Arendsee, 2016-2026\nLicense     :"
  },
  {
    "path": "executable/Subcommands.hs",
    "chars": 36945,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Subcommands\nDescription : Dispatch CLI subcommands and inject the"
  },
  {
    "path": "executable/UI.hs",
    "chars": 11409,
    "preview": "{- |\nModule      : UI\nDescription : CLI argument parsing with optparse-applicative\nCopyright   : (c) Zebulun Arendsee, 2"
  },
  {
    "path": "fourmolu.yaml",
    "chars": 885,
    "preview": "# Fourmolu configuration for morloc compiler\n# https://github.com/fourmolu/fourmolu\n\n# Indentation\nindentation: 2\n\n# Max"
  },
  {
    "path": "hie.yaml",
    "chars": 447,
    "preview": "cradle:\n  stack:\n    - path: \"./library\"\n      component: \"morloc:lib\"\n\n    - path: \"./executable/Main.hs\"\n      compone"
  },
  {
    "path": "library/Morloc/BaseTypes.hs",
    "chars": 2702,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.BaseTypes\nDescription : Predefined base type names and con"
  },
  {
    "path": "library/Morloc/CodeGenerator/Docstrings.hs",
    "chars": 13235,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Docstrings\nDes"
  },
  {
    "path": "library/Morloc/CodeGenerator/Emit.hs",
    "chars": 2878,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Emit\nDescripti"
  },
  {
    "path": "library/Morloc/CodeGenerator/Express.hs",
    "chars": 33485,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Express\nDescri"
  },
  {
    "path": "library/Morloc/CodeGenerator/Grammars/Common.hs",
    "chars": 24370,
    "preview": "{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE FlexibleContexts #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPat"
  },
  {
    "path": "library/Morloc/CodeGenerator/Grammars/Macro.hs",
    "chars": 1157,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Grammars.Macro\nDescription : Expand paramete"
  },
  {
    "path": "library/Morloc/CodeGenerator/Grammars/Translator/Generic.hs",
    "chars": 34409,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE QuasiQuotes #-}\n{-# LANGUAGE TemplateHaskell #-}\n{-# LANGUAGE ViewPatter"
  },
  {
    "path": "library/Morloc/CodeGenerator/Grammars/Translator/Imperative.hs",
    "chars": 26726,
    "preview": "{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morl"
  },
  {
    "path": "library/Morloc/CodeGenerator/Grammars/Translator/PseudoCode.hs",
    "chars": 9465,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Grammars.Trans"
  },
  {
    "path": "library/Morloc/CodeGenerator/Infer.hs",
    "chars": 9433,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Infer\nDescript"
  },
  {
    "path": "library/Morloc/CodeGenerator/LambdaEval.hs",
    "chars": 8357,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.LambdaEval\nDes"
  },
  {
    "path": "library/Morloc/CodeGenerator/LanguageDescriptor.hs",
    "chars": 14082,
    "preview": "{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.CodeGenerator.LanguageDescr"
  },
  {
    "path": "library/Morloc/CodeGenerator/Namespace.hs",
    "chars": 56101,
    "preview": "{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE TypeFamilies #-}\n{-# LANGUAGE Undecid"
  },
  {
    "path": "library/Morloc/CodeGenerator/Nexus.hs",
    "chars": 32968,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Nexus\nDescript"
  },
  {
    "path": "library/Morloc/CodeGenerator/Parameterize.hs",
    "chars": 6020,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Parameterize\nDescription : Propagate functio"
  },
  {
    "path": "library/Morloc/CodeGenerator/Realize.hs",
    "chars": 29351,
    "preview": "{-# LANGUAGE CPP #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGen"
  },
  {
    "path": "library/Morloc/CodeGenerator/Reduce.hs",
    "chars": 5963,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Reduce\nDescription : Compile-time reduction "
  },
  {
    "path": "library/Morloc/CodeGenerator/Segment.hs",
    "chars": 5682,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Segment\nDescription : Break polymorphic mani"
  },
  {
    "path": "library/Morloc/CodeGenerator/Serial.hs",
    "chars": 27545,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Serial\nDescrip"
  },
  {
    "path": "library/Morloc/CodeGenerator/Serialize.hs",
    "chars": 27766,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.CodeGenerator.Serialize\nDesc"
  },
  {
    "path": "library/Morloc/CodeGenerator/SystemConfig.hs",
    "chars": 14878,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ScopedTypeVariables #-}\n\n{- |\nModule      : Morloc.CodeGenerator.SystemC"
  },
  {
    "path": "library/Morloc/Completion.hs",
    "chars": 21886,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# OPTIONS_GHC -Wno-unused-top-binds #-}\n\n{- |\nModule      : Morloc.Completion\nDescr"
  },
  {
    "path": "library/Morloc/Config.hs",
    "chars": 6112,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Config\nDescription : Configuration loading and default pat"
  },
  {
    "path": "library/Morloc/Data/Annotated.hs",
    "chars": 1552,
    "preview": "{-# LANGUAGE TypeFamilies #-}\n\n{- |\nModule      : Morloc.Data.Annotated\nDescription : Class of annotated entities\nCopyri"
  },
  {
    "path": "library/Morloc/Data/Bifoldable.hs",
    "chars": 7765,
    "preview": "{-# LANGUAGE TypeFamilies #-}\n\n{- |\nModule      : Morloc.Data.Bifoldable\nDescription : The Bifoldable typeclass with mon"
  },
  {
    "path": "library/Morloc/Data/Bifunctor.hs",
    "chars": 1645,
    "preview": "{-# LANGUAGE TypeFamilies #-}\n\n{- |\nModule      : Morloc.Data.Bifunctor\nDescription : The Bifunctor typeclass, with mona"
  },
  {
    "path": "library/Morloc/Data/DAG.hs",
    "chars": 4275,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Data.DAG\nDescription : Functions for working with directed"
  },
  {
    "path": "library/Morloc/Data/Doc.hs",
    "chars": 2779,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Data.Doc\nDescription : Pretty-printing utilities wrapping "
  },
  {
    "path": "library/Morloc/Data/GMap.hs",
    "chars": 4680,
    "preview": "{- |\nModule      : Morloc.Data.GMap\nDescription : A general map datatype (non-injective and non-surjective)\nCopyright   "
  },
  {
    "path": "library/Morloc/Data/Json.hs",
    "chars": 2135,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Data.Json\nDescription : Lightweight JSON builder utilities"
  },
  {
    "path": "library/Morloc/Data/Map/Extra.hs",
    "chars": 2915,
    "preview": "{- |\nModule      : Morloc.Data.Map.Extra\nDescription : Additional functions for the Map class\nCopyright   : (c) Zebulun "
  },
  {
    "path": "library/Morloc/Data/Map.hs",
    "chars": 331,
    "preview": "{- |\nModule      : Morloc.Data.Map\nDescription : An extension of the base map module\nCopyright   : (c) Zebulun Arendsee,"
  },
  {
    "path": "library/Morloc/Data/Text.hs",
    "chars": 2276,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Data.Text\nDescription : Text utilities and re-exports\nCopy"
  },
  {
    "path": "library/Morloc/DataFiles.hs",
    "chars": 5419,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE TemplateHaskell #-}\n\n{- |\nModule      : Morloc.DataFiles\nDescription : T"
  },
  {
    "path": "library/Morloc/Frontend/API.hs",
    "chars": 7619,
    "preview": "{- |\nModule      : Morloc.Frontend.API\nDescription : Entry point for the frontend pipeline (parse, typecheck, valuecheck"
  },
  {
    "path": "library/Morloc/Frontend/AST.hs",
    "chars": 11442,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Frontend.AST\nDescription : Query and traversal functions o"
  },
  {
    "path": "library/Morloc/Frontend/CST.hs",
    "chars": 4772,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Frontend.CST\nDescription : Concrete syntax tree types for "
  },
  {
    "path": "library/Morloc/Frontend/Desugar.hs",
    "chars": 43658,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Frontend.Desugar\nDescription : Transform the concrete synt"
  },
  {
    "path": "library/Morloc/Frontend/Lexer.hs",
    "chars": 40753,
    "preview": "{-# LANGUAGE BangPatterns #-}\n{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Frontend.Lexer\nDescription :"
  },
  {
    "path": "library/Morloc/Frontend/Link.hs",
    "chars": 29839,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Frontend.Link\nDescription : "
  },
  {
    "path": "library/Morloc/Frontend/Merge.hs",
    "chars": 6212,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Frontend.Merge\nDescription : Merge and unify type signatur"
  },
  {
    "path": "library/Morloc/Frontend/Namespace.hs",
    "chars": 5056,
    "preview": "{- |\nModule      : Morloc.Frontend.Namespace\nDescription : Re-exports of core namespace types plus frontend-specific hel"
  },
  {
    "path": "library/Morloc/Frontend/Parser.hs",
    "chars": 275608,
    "preview": "{-# OPTIONS_GHC -w #-}\n{-# LANGUAGE CPP #-}\n{-# LANGUAGE MagicHash #-}\n{-# LANGUAGE BangPatterns #-}\n{-# LANGUAGE TypeSy"
  },
  {
    "path": "library/Morloc/Frontend/Parser.y",
    "chars": 46911,
    "preview": "{\n{-# LANGUAGE OverloadedStrings #-}\n\nmodule Morloc.Frontend.Parser\n  ( readProgram\n  , readType\n  , PState (..)\n  , emp"
  },
  {
    "path": "library/Morloc/Frontend/Restructure.hs",
    "chars": 39568,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE TupleSections #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morl"
  },
  {
    "path": "library/Morloc/Frontend/Token.hs",
    "chars": 5983,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Frontend.Token\nDescription : Token types shared between th"
  },
  {
    "path": "library/Morloc/Frontend/Treeify.hs",
    "chars": 15518,
    "preview": "{-# LANGUAGE CPP #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Fronten"
  },
  {
    "path": "library/Morloc/Frontend/Typecheck.hs",
    "chars": 49162,
    "preview": "{-# LANGUAGE CPP #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Fronten"
  },
  {
    "path": "library/Morloc/Frontend/Valuecheck.hs",
    "chars": 13543,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Frontend.Valuecheck\nDescript"
  },
  {
    "path": "library/Morloc/Internal.hs",
    "chars": 4383,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Internal\nDescription : Proto-prelude re-exporting common u"
  },
  {
    "path": "library/Morloc/LangRegistry.hs",
    "chars": 8506,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.LangRegistry\nDescription : Language registry loaded from l"
  },
  {
    "path": "library/Morloc/Language.hs",
    "chars": 1840,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Language\nDescription : Language type and utilities\nCopyrig"
  },
  {
    "path": "library/Morloc/Module.hs",
    "chars": 38103,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Module\nDescription : Module "
  },
  {
    "path": "library/Morloc/Monad.hs",
    "chars": 16609,
    "preview": "{-# LANGUAGE FlexibleContexts #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : M"
  },
  {
    "path": "library/Morloc/Namespace/Expr.hs",
    "chars": 23943,
    "preview": "{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morl"
  },
  {
    "path": "library/Morloc/Namespace/Prim.hs",
    "chars": 9079,
    "preview": "{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Namespace.Prim\nDescription "
  },
  {
    "path": "library/Morloc/Namespace/State.hs",
    "chars": 13217,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Namespace.State\nDescription : Compiler state, monad stack,"
  },
  {
    "path": "library/Morloc/Namespace/Type.hs",
    "chars": 26311,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Namespace.Type\nDescription :"
  },
  {
    "path": "library/Morloc/ProgramBuilder/Build.hs",
    "chars": 2865,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.ProgramBuilder.Build\nDescription : Compile pool source fil"
  },
  {
    "path": "library/Morloc/ProgramBuilder/Install.hs",
    "chars": 14866,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.ProgramBuilder.Install\nDescription : Install compiled morl"
  },
  {
    "path": "library/Morloc/Quasi.hs",
    "chars": 1730,
    "preview": "{-# LANGUAGE QuasiQuotes #-}\n{-# LANGUAGE TemplateHaskell #-}\n\n{- |\nModule      : Morloc.Quasi\nDescription : String-inte"
  },
  {
    "path": "library/Morloc/System.hs",
    "chars": 1085,
    "preview": "{- |\nModule      : Morloc.System\nDescription : Filesystem re-exports and YAML config loading\nCopyright   : (c) Zebulun A"
  },
  {
    "path": "library/Morloc/TypeEval.hs",
    "chars": 14506,
    "preview": "{-# LANGUAGE CPP #-}\n{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.TypeEval\nDescription : Expand type al"
  },
  {
    "path": "library/Morloc/Typecheck/Internal.hs",
    "chars": 49848,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE ViewPatterns #-}\n\n{- |\nModule      : Morloc.Typecheck.Internal\nDescripti"
  },
  {
    "path": "library/Morloc/Typecheck/NatSolver.hs",
    "chars": 9451,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc.Typecheck.NatSolver\nDescription : Type-level natural numbe"
  },
  {
    "path": "library/Morloc/Version.hs",
    "chars": 357,
    "preview": "{- |\nModule      : Morloc.Version\nDescription : Store the morloc version\nCopyright   : (c) Zebulun Arendsee, 2016-2026\nL"
  },
  {
    "path": "library/Morloc.hs",
    "chars": 6144,
    "preview": "{-# LANGUAGE OverloadedStrings #-}\n\n{- |\nModule      : Morloc\nDescription : Top-level compiler pipeline: parse, typechec"
  },
  {
    "path": "metrics/README.md",
    "chars": 4400,
    "preview": "# Morloc Compiler Metrics\n\nThis directory contains tools for collecting and tracking code quality metrics for the morloc"
  },
  {
    "path": "metrics/scripts/collect-metrics.sh",
    "chars": 5291,
    "preview": "#!/usr/bin/env bash\n# Collect code metrics for morloc compiler\n# Usage: ./collect-metrics.sh [version-label]\n#\n# Require"
  },
  {
    "path": "metrics/scripts/compare-metrics.sh",
    "chars": 6312,
    "preview": "#!/usr/bin/env bash\n# Compare two metric snapshots\n# Usage: ./compare-metrics.sh <baseline.json> <current.json>\n\nset -eu"
  },
  {
    "path": "package.yaml",
    "chars": 4098,
    "preview": "name:             morloc\nversion:          0.81.0\nhomepage:         https://github.com/morloc-project/morloc\nsynopsis:  "
  },
  {
    "path": "scripts/build-rust.sh",
    "chars": 2284,
    "preview": "#!/usr/bin/env bash\n# Build static Rust binaries and/or container images locally.\n#\n# Usage:\n#   ./scripts/build-rust.sh"
  },
  {
    "path": "scripts/bump-version.sh",
    "chars": 1192,
    "preview": "#!/usr/bin/env bash\n# Sync version from ChangeLog.md to package.yaml and Cargo.toml files.\n# Usage: after adding a new C"
  },
  {
    "path": "spec/SPEC.md",
    "chars": 3607,
    "preview": "# Morloc Language Specification\n\nThis document is the master table of contents for the Morloc formal specification. It d"
  },
  {
    "path": "spec/compiler/COMPILER.md",
    "chars": 1907,
    "preview": "# Compiler Architecture\n\nThe morloc compiler transforms `.loc` source files into executable programs consisting of a nex"
  },
  {
    "path": "spec/compiler/build.md",
    "chars": 3504,
    "preview": "# Build System\n\nThe build phase writes generated code to disk, compiles what needs compiling, and assembles the final ex"
  },
  {
    "path": "spec/compiler/codegen.md",
    "chars": 4853,
    "preview": "# Code Generation\n\nCode generation transforms the type-checked, realized program into a JSON manifest and language-speci"
  },
  {
    "path": "spec/compiler/parsing.md",
    "chars": 3833,
    "preview": "# Parsing\n\nThe parser transforms morloc source text into an indexed expression AST. It uses parser combinators with stat"
  },
  {
    "path": "spec/compiler/pipeline.md",
    "chars": 3776,
    "preview": "# Compilation Pipeline\n\nThe morloc compiler transforms source files into an executable through seven major phases. Each "
  },
  {
    "path": "spec/compiler/typechecking.md",
    "chars": 4599,
    "preview": "# Type Checking\n\nThe morloc typechecker implements bidirectional type checking based on Dunfield and Krishnaswami (2013)"
  },
  {
    "path": "spec/interop/INTEROP.md",
    "chars": 1710,
    "preview": "# Cross-Language Interoperability\n\nMorloc's central design goal is composing functions across Python, C++, and R within "
  },
  {
    "path": "spec/interop/foreign-functions.md",
    "chars": 2535,
    "preview": "# Foreign Functions\n\nForeign function declarations bind functions from Python, C++, or R source files to morloc names. T"
  },
  {
    "path": "spec/interop/implementation-selection.md",
    "chars": 3028,
    "preview": "# Implementation Selection\n\nWhen a function has implementations in multiple languages, the compiler must choose which to"
  },
  {
    "path": "spec/interop/serialization.md",
    "chars": 3269,
    "preview": "# Serialization\n\nWhen data crosses a language boundary, it is serialized to a binary format, transmitted, and deserializ"
  },
  {
    "path": "spec/interop/type-mappings.md",
    "chars": 2732,
    "preview": "# Type Mappings\n\nType mappings define how morloc's general types resolve to concrete representations in each target lang"
  },
  {
    "path": "spec/language/LANGUAGE.md",
    "chars": 2126,
    "preview": "# Language Reference\n\nMorloc is a typed, functional workflow language for composing functions across Python, C++, and R "
  },
  {
    "path": "spec/language/annotations.md",
    "chars": 2076,
    "preview": "# Annotations\n\nMorloc uses docstring comments and metadata tags to annotate exported functions. These annotations drive "
  },
  {
    "path": "spec/language/declarations.md",
    "chars": 3685,
    "preview": "# Declarations\n\nTop-level declarations define the structure of a morloc program: modules, imports, functions, types, and"
  },
  {
    "path": "spec/language/expressions.md",
    "chars": 2729,
    "preview": "# Expressions\n\nMorloc expressions describe data transformations. Every expression has a type, inferred or checked by the"
  },
  {
    "path": "spec/language/lexical-structure.md",
    "chars": 2828,
    "preview": "# Lexical Structure\n\n## Character Set\n\nAll morloc source files must contain only ASCII characters. Non-ASCII characters "
  }
]

// ... and 2081 more files (download for full content)

About this extraction

This page contains the full source code of the morloc-project/morloc GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2281 files (3.9 MB), approximately 1.1M tokens, and a symbol index with 2679 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!