Skip to content

✨ feat(mq-check): add slugify and percentile functions to builtin registry#1474

Merged
harehare merged 2 commits intomainfrom
feat/mq-check-builtin-slugify-percentile
Mar 19, 2026
Merged

✨ feat(mq-check): add slugify and percentile functions to builtin registry#1474
harehare merged 2 commits intomainfrom
feat/mq-check-builtin-slugify-percentile

Conversation

@harehare
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 19, 2026 14:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates mq-check’s builtin type registry so the type checker recognizes two stdlib functions (slugify and percentile) that exist in mq-lang’s builtin.mq.

Changes:

  • Register slugify as an overloaded function (1-arg and 2-arg forms) in the string builtin registry.
  • Register percentile as a new array builtin in the type registry.


// percentile: ([a], number) -> number
let a = ctx.fresh_var();
register_binary(ctx, "percentile", Type::array(a), Type::Number, Type::Number);
Comment on lines +496 to +498
// percentile: ([a], number) -> number
let a = ctx.fresh_var();
register_binary(ctx, "percentile", Type::array(a), Type::Number, Type::Number);
@harehare harehare merged commit c1857c2 into main Mar 19, 2026
4 checks passed
@harehare harehare deleted the feat/mq-check-builtin-slugify-percentile branch March 19, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants