Type Inference for nix working group

Hi,

I have attributed my bachelor’s thesis to static type inference for the Nix language and will pick up on the topic again for my master’s degree. I will try to implement a second calculus that supports Nix’s deeply nested records (Attrsets) throughout the summer and would like to connect with other pioneers interested in the topic. If you are interested, please contact me at sk925@email.uni-freiburg.de

I’m looking forward to meeting you :slight_smile:

11 Likes

I just want to let people who stumble upon this know, I’m still alive and working on it, presumably until the end of November 2026, when I try to finish my Master’s Degree. So if you’re interested in it, feel free to reach out any time :slight_smile: Also, excitingly, someone else has published in Nix language theory recently: https://dl.acm.org/doi/10.1145/3747537

6 Likes

Someone wrote another LSP for option-completion Making a Type Checker/LSP for Nix | John's Codes, which uses the same approach (algebraic subtyping) as me.

1 Like

I have finished my thesis and created a novel record calculus for Nix. The type system is inspired by many existing record calculi (semantic, algebraic, soft, etc.), optimizing for efficiency, totality, and completeness. It only handles a core calculus of Nix, but it shows a path towards full coverage by integrating gradual typing. I’m currently looking for a PhD position and will see whether I find the time to continue my efforts. I’m also looking for funding to extend and integrate the type system with real Nix. The shown system has one major flaw: It uses a record semantics that is too coarse for Nix (see the discussion part for this) that has to be redone to make it applicable.

You can find the thesis here: garnix/spec/masterthesis/text/thesis.pdf at 65deb3b2e984f0b65fdf1adbb0ab5c9060dd39b1 · Septias/garnix · GitHub

It goes in the direction of TypeNix and tynix, which are the bigger projects with more traction at the moment.

10 Likes