TEMP: add Null type

This commit is contained in:
Emile Clark-Boman 2026-01-25 09:35:39 +10:00
parent d20a15c01c
commit a7d0e34cb7
4 changed files with 27 additions and 0 deletions

View file

@ -5,6 +5,7 @@ let
import ./util.nix input
// import ./parse.nix input
// import ./trapdoor.nix input
// import ./null.nix input
// import ./wrap.nix input
// import ./enforce.nix input
// import ./sig.nix input

View file

@ -3,6 +3,7 @@ mix.newMixture inputs (mixture: {
includes.public = [
./enforce.nix
./nt.nix
./null.nix
./parse.nix
./sig.nix
./trapdoor.nix

View file

@ -0,0 +1,24 @@
# XXX: TODO: replace Null with the naive Maybe type
{this, ...}: let
inherit
(this)
ntTrapdoorKey
mkTrapdoorSet
;
in {
# NOTE: This is not good for writing type safe code
# NOTE: it is however efficient for bootstrapping the primitives
Null =
# WARNING: Null skips implementing a Type altogether
# WARNING: Null is an orphaned Type instance
mkTrapdoorSet ntTrapdoorKey {
default = {};
unlock = {
instance = true;
sig = "nt::Null";
derive = [];
ops = {};
req = {};
};
};
}

View file

@ -1,3 +1,4 @@
# XXX: TODO: use the custom Null type instance instead of the Wrap type
{this, ...}: let
inherit
(builtins)