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