NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.96k stars 1.54k forks source link

Declarative signature specification for built-in functions #10373

Open fricklerhandwerk opened 8 months ago

fricklerhandwerk commented 8 months ago

Problem statement

Currently, implementation of builtins procedurally checks validity of arguments, and interface documentation has to be written manually.

Solution proposal

Create a data structure that represents language values and use that when registering primops; automatically generate interface documentation from that.

Related

nixos-discourse commented 6 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-06-05-nix-team-meeting-minutes-150/46583/1