update inherit paths
This commit is contained in:
parent
1c807428ad
commit
e5c8479a8f
10 changed files with 88 additions and 37 deletions
|
|
@ -9,13 +9,21 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
(this.util)
|
(this.std)
|
||||||
filterAttrs
|
filterAttrs
|
||||||
hasInfix
|
hasInfix
|
||||||
mergeAttrsList
|
mergeAttrsList
|
||||||
nameValuePair
|
nameValuePair
|
||||||
projectOnto
|
|
||||||
removeSuffix
|
removeSuffix
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this.parse)
|
||||||
|
projectOnto
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this.types)
|
||||||
Wrap
|
Wrap
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,12 @@ let
|
||||||
delegate;
|
delegate;
|
||||||
|
|
||||||
this = bootstrap {inherit this bootstrap;} [
|
this = bootstrap {inherit this bootstrap;} [
|
||||||
|
./nt.nix
|
||||||
{
|
{
|
||||||
std = ./std/bootstrap.nix;
|
std = ./std/bootstrap.nix;
|
||||||
types = ./types/bootstrap.nix;
|
types = ./types/bootstrap.nix;
|
||||||
parse = ./parse/bootstrap.nix;
|
parse = ./parse/bootstrap.nix;
|
||||||
|
trapdoor = ./trapdoor.nix;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
(this)
|
(this.trapdoor)
|
||||||
mkTrapdoorKey
|
mkTrapdoorKey
|
||||||
openTrapdoor
|
openTrapdoor
|
||||||
;
|
;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@
|
||||||
(this.std)
|
(this.std)
|
||||||
enfIsAttrs
|
enfIsAttrs
|
||||||
;
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this.types)
|
||||||
|
Wrap
|
||||||
|
;
|
||||||
in rec {
|
in rec {
|
||||||
# form: getAttrAt :: list string -> set -> null | Wrap Any
|
# form: getAttrAt :: list string -> set -> null | Wrap Any
|
||||||
# given path as a list of strings, return that value of an
|
# given path as a list of strings, return that value of an
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{...}: let
|
{this, ...}: let
|
||||||
inherit
|
inherit
|
||||||
(builtins)
|
(builtins)
|
||||||
attrNames
|
attrNames
|
||||||
|
|
@ -14,6 +14,12 @@
|
||||||
tail
|
tail
|
||||||
typeOf
|
typeOf
|
||||||
;
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this)
|
||||||
|
flipCurry
|
||||||
|
id
|
||||||
|
;
|
||||||
in rec {
|
in rec {
|
||||||
enfIsAttrs = value: msg: let
|
enfIsAttrs = value: msg: let
|
||||||
got = typeOf value;
|
got = typeOf value;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
# WARNING: /nt/primitives/bootstrap cannot depend on mix
|
||||||
# WARNING: this file is strictly for bootstrapping nt
|
# WARNING: this file is strictly for bootstrapping nt
|
||||||
{bootstrap, ...} @ inputs:
|
{bootstrap, ...}: let
|
||||||
bootstrap inputs [
|
# WARNING: do not propagate `this` from parent, bootstrap/std must
|
||||||
./attrs.nix
|
# WARNING: remain entirely independent from bootstrap
|
||||||
./enforce.nix
|
this = bootstrap {inherit this bootstrap;} [
|
||||||
./fn.nix
|
./attrs.nix
|
||||||
./list.nix
|
./fn.nix
|
||||||
./num.nix
|
./list.nix
|
||||||
./string.nix
|
./num.nix
|
||||||
]
|
./string.nix
|
||||||
|
];
|
||||||
|
in
|
||||||
|
this
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,21 @@
|
||||||
{this, ...}: let
|
{this, ...}: let
|
||||||
# inherit
|
inherit
|
||||||
# (this)
|
(this)
|
||||||
# enfImpls
|
ntTrapdoorKey
|
||||||
# mkTrapdoorFn
|
ntDynamicTrapdoorKey
|
||||||
# mkTrapdoorSet
|
;
|
||||||
# ntTrapdoorKey
|
|
||||||
# ntDynamicTrapdoorKey
|
inherit
|
||||||
# openTrapdoor
|
(this.std)
|
||||||
# ;
|
enfImpls
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this.trapdoor)
|
||||||
|
mkTrapdoorFn
|
||||||
|
mkTrapdoorSet
|
||||||
|
openTrapdoor
|
||||||
|
;
|
||||||
in {
|
in {
|
||||||
# NOTE: Maybe is used to simplify parsing Type/Class declarations
|
# NOTE: Maybe is used to simplify parsing Type/Class declarations
|
||||||
# NOTE: and therefore must be implemented manually
|
# NOTE: and therefore must be implemented manually
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
# XXX: TODO: replace Null with the naive Maybe type
|
# XXX: TODO: replace Null with the naive Maybe type
|
||||||
{this, ...}: let
|
{this, ...}: let
|
||||||
# inherit
|
inherit
|
||||||
# (this)
|
(this)
|
||||||
# ntTrapdoorKey
|
ntTrapdoorKey
|
||||||
# mkTrapdoorSet
|
;
|
||||||
# ;
|
inherit
|
||||||
|
(this.trapdoor)
|
||||||
|
mkTrapdoorSet
|
||||||
|
;
|
||||||
in {
|
in {
|
||||||
# NOTE: This is not good for writing type safe code
|
# NOTE: This is not good for writing type safe code
|
||||||
# NOTE: it is however efficient for bootstrapping the primitives
|
# NOTE: it is however efficient for bootstrapping the primitives
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
{this, ...}: let
|
{this, ...}: let
|
||||||
# inherit
|
inherit
|
||||||
# (this)
|
(this)
|
||||||
# ntTrapdoorKey
|
ntTrapdoorKey
|
||||||
# mkTrapdoorFn
|
;
|
||||||
# mkTrapdoorSet
|
|
||||||
# ;
|
inherit
|
||||||
|
(this.trapdoor)
|
||||||
|
mkTrapdoorFn
|
||||||
|
mkTrapdoorSet
|
||||||
|
;
|
||||||
in {
|
in {
|
||||||
# NOTE: Wrap is used to simplify parsing Type/Class declarations
|
# NOTE: Wrap is used to simplify parsing Type/Class declarations
|
||||||
# NOTE: and therefore must be implemented manually
|
# NOTE: and therefore must be implemented manually
|
||||||
|
|
|
||||||
|
|
@ -8,17 +8,29 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
(this.util)
|
(this)
|
||||||
enfIsType
|
enfIsType
|
||||||
enfIsClassSig
|
typeSig
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this.std)
|
||||||
flipCurry
|
flipCurry
|
||||||
|
removeAttrsRec
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(this.parse)
|
||||||
|
enfIsClassSig
|
||||||
hasAttrAt
|
hasAttrAt
|
||||||
mkTrapdoorSet
|
mkTrapdoorSet
|
||||||
ntTrapdoorKey
|
ntTrapdoorKey
|
||||||
parseClassSig
|
parseClassSig
|
||||||
projectOnto
|
projectOnto
|
||||||
removeAttrsRec
|
;
|
||||||
typeSig
|
|
||||||
|
inherit
|
||||||
|
(this.types)
|
||||||
Wrap
|
Wrap
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue