cek-oneml: Demonstrative 1ML first-class module evaluator for CEK machines

[ compilers-interpreters, language, library ] [ Propose Tags ] [ Report a vulnerability ]

An educational and demonstrative reference evaluator showcasing Andreas Rossberg's 1ML first-class module system over the CEK abstract machine with MergeMorph3 existential sealing and Pykinos hidden classes.

Notice: This package is provided primarily as an executable architectural example and documentation case study within the cek ecosystem.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.2
Change log CHANGELOG.md
Dependencies base (>=4.18 && <5), cek-core (>=0.1.0.0 && <0.2), cek-pykinos (>=0.1.0.0 && <0.2), ghc-prim (>=0.10 && <0.14), primitive (>=0.9 && <0.10), pykinos-core (>=0.1.0.0 && <0.2) [details]
Tested with ghc ==9.14.1
License (EUPL-1.2 OR Apache-2.0)
Author Nadia Yvette Chambers
Maintainer nadia.yvette.chambers@ik.me
Uploaded by nyc at 2026-11-19T20:07:48Z
Category Language, Compilers/Interpreters
Home page https://github.com/NadiaYvette/cek
Bug tracker https://github.com/NadiaYvette/cek/issues
Source repo head: git clone https://github.com/NadiaYvette/cek(packages/cek-oneml)
Distributions
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for cek-oneml-0.1.0.2

[back to package description]

cek-oneml

Important Notice: This package is an educational and demonstrative reference implementation showcasing Andreas Rossberg's 1ML first-class module system over the CEK abstract machine with MergeMorph3 existential sealing and Pykinos hidden classes. It is provided primarily as an executable architectural example within the cek ecosystem documentation.

Overview

cek-oneml implements the core of Andreas Rossberg's "1ML — Core and the Modules in the Same Language" (ICFP 2015), executing first-class structures, signatures, and functors directly over unboxed data structures:

  1. Flat Structural Layouts: Structures and signatures are flat arrays of lazy cells indexed by FieldId and mapped to SchemaId identifiers in Pykinos.Schema.HiddenClass.
  2. Existential Sealing (Mod :> Sig): Computes a domain restriction (OpRestrict) in \(O(|Sig|)\) time. For every abstract type field (SpecAbstract), the evaluator mints a fresh skolem constant (CT_WNeu) in SoAStore, concealing the underlying concrete type without dynamic wrapper closures.
  3. Module Functors: Functors are ordinary first-class functions parameterized over module records.

Module Structure

  • Cek.OneML: Primary reference evaluator and AST definitions.
  • Cek.Examples.OneML: Backward-compatibility re-export module.

Building and Testing

cabal build cek-oneml
cabal test cek-oneml:tests

License

EUPL-1.2.