TEMP: add Null type
This commit is contained in:
parent
d20a15c01c
commit
a7d0e34cb7
4 changed files with 27 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ mix.newMixture inputs (mixture: {
|
|||
includes.public = [
|
||||
./enforce.nix
|
||||
./nt.nix
|
||||
./null.nix
|
||||
./parse.nix
|
||||
./sig.nix
|
||||
./trapdoor.nix
|
||||
|
|
|
|||
24
nt/primitives/util/null.nix
Normal file
24
nt/primitives/util/null.nix
Normal 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 = {};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# XXX: TODO: use the custom Null type instance instead of the Wrap type
|
||||
{this, ...}: let
|
||||
inherit
|
||||
(builtins)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue