OJaml / docsProject documentation

How-to guides

Add a builtin consistently

Complete a task or diagnose a specific problem.

1. Start with its signature and type factory in check.ts. Repeated variables in a polymorphic signature must share the intended relationships, while separate call sites receive fresh variables.

2. Add its arity, emitted safe name, and runtime helper in compiler.ts. Select its value interpretation from checked types rather than guessing from an i32.

3. Expose the shared signature to Monaco. Validate accepted execution and rejected type mismatches; a completion entry alone does not implement a builtin.