add build of nixpkgs-lib-dhall
This commit is contained in:
parent
5b87d8db80
commit
4a0a1cbbb0
38 changed files with 108 additions and 73 deletions
|
@ -2,7 +2,7 @@
|
|||
let Any = ../Any/Type.dhall
|
||||
|
||||
let Optional/fold =
|
||||
https://prelude.dhall-lang.org/Optional/fold.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/fold.dhall
|
||||
sha256:c5b9d72f6f62bdaa0e196ac1c742cc175cd67a717b880fb8aec1333a5a4132cf
|
||||
|
||||
let Any/toAny = ../Any/toAny.dhall nix
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let Optional/map =
|
||||
https://prelude.dhall-lang.org/Optional/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/map.dhall
|
||||
sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa
|
||||
|
||||
let max = ./max.dhall nix
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let Optional/map =
|
||||
https://prelude.dhall-lang.org/Optional/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/map.dhall
|
||||
sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa
|
||||
|
||||
let min = ./min.dhall nix
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
let Set/toSet = ../Set/toSet.dhall nix
|
||||
|
||||
let Map =
|
||||
https://prelude.dhall-lang.org/Map/Type.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Map/Type.dhall
|
||||
sha256:210c7a9eba71efbb0f7a66b3dcf8b9d3976ffc2bc0e907aadfb6aa29c333e8ed
|
||||
|
||||
let composeManyExtensions
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
let Set = ../Set/Type.dhall
|
||||
|
||||
let Optional/fold =
|
||||
https://prelude.dhall-lang.org/Optional/fold.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/fold.dhall
|
||||
sha256:c5b9d72f6f62bdaa0e196ac1c742cc175cd67a717b880fb8aec1333a5a4132cf
|
||||
|
||||
let Any/toAny = ../Any/toAny.dhall nix
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
let List/foldLeft =
|
||||
https://prelude.dhall-lang.org/List/foldLeft.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/List/foldLeft.dhall
|
||||
sha256:3c6ab57950fe644906b7bbdef0b9523440b6ee17773ebb8cbd41ffacb8bfab61
|
||||
|
||||
let pipe
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Any = ../Any/Type.dhall
|
||||
|
||||
let Map =
|
||||
https://prelude.dhall-lang.org/Map/Type.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Map/Type.dhall
|
||||
sha256:210c7a9eba71efbb0f7a66b3dcf8b9d3976ffc2bc0e907aadfb6aa29c333e8ed
|
||||
|
||||
let Set = ../Set/Type.dhall
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
let Integer/add =
|
||||
https://prelude.dhall-lang.org/Integer/add.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/add.dhall
|
||||
sha256:7da1306a0bf87c5668beead2a1db1b18861e53d7ce1f38057b2964b649f59c3b
|
||||
|
||||
let negate =
|
||||
https://prelude.dhall-lang.org/Integer/negate.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/negate.dhall
|
||||
sha256:2373c992e1de93634bc6a8781eb073b2a92a70170133e49762a785f3a136df5d
|
||||
|
||||
let Integer/succ
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
let lessThan =
|
||||
https://prelude.dhall-lang.org/Integer/lessThan.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/lessThan.dhall
|
||||
sha256:eeaa0081d10c6c97464ef193c40f1aa5cbb12f0202972ab42f3d310c2fd6a3f0
|
||||
|
||||
let greaterThan =
|
||||
https://prelude.dhall-lang.org/Integer/greaterThan.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/greaterThan.dhall
|
||||
sha256:d23affd73029fc9aaf867c2c7b86510ca2802d3f0d1f3e1d1a93ffd87b7cb64b
|
||||
|
||||
let compare
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
let Integer/negative =
|
||||
https://prelude.dhall-lang.org/Integer/negative.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/negative.dhall
|
||||
sha256:23e4b3c61eea9e878a7f83bf25fd0ea2c6a6d60174890d65be885828b690a570
|
||||
|
||||
let Integer/abs =
|
||||
https://prelude.dhall-lang.org/Integer/abs.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/abs.dhall
|
||||
sha256:35212fcbe1e60cb95b033a4a9c6e45befca4a298aa9919915999d09e69ddced1
|
||||
|
||||
let fold
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
let Integer/nonPositive =
|
||||
https://prelude.dhall-lang.org/Integer/nonPositive.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/nonPositive.dhall
|
||||
sha256:e00a852eed5b84ff60487097d8aadce53c9e5301f53ff4954044bd68949fac3b
|
||||
|
||||
let Integer/nonNegative =
|
||||
https://prelude.dhall-lang.org/Integer/nonNegative.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/nonNegative.dhall
|
||||
sha256:b463373f070df6b1c8c7082051e0810fee38b360bab35256187c8c2b6af5c663
|
||||
|
||||
let isZero
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
let max = ./max.dhall
|
||||
|
||||
let Optional/map =
|
||||
https://prelude.dhall-lang.org/Optional/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/map.dhall
|
||||
sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa
|
||||
|
||||
let listMax
|
||||
|
|
|
@ -3,7 +3,7 @@ let min = ./min.dhall
|
|||
let Integer/isZero = ./isZero.dhall
|
||||
|
||||
let Optional/map =
|
||||
https://prelude.dhall-lang.org/Optional/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/map.dhall
|
||||
sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa
|
||||
|
||||
let listMin
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--| `max a b` returns the larger of `a` or `b`
|
||||
let lessThanEqual =
|
||||
https://prelude.dhall-lang.org/Integer/lessThanEqual.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/lessThanEqual.dhall
|
||||
sha256:e3cca9f3942f81fa78a2bea23c0c24519c67cfe438116c38e797e12dcd26f6bc
|
||||
|
||||
let max
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--| `min a b` returns the smaller of `a` or `b`
|
||||
let lessThanEqual =
|
||||
https://prelude.dhall-lang.org/Integer/lessThanEqual.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/lessThanEqual.dhall
|
||||
sha256:e3cca9f3942f81fa78a2bea23c0c24519c67cfe438116c38e797e12dcd26f6bc
|
||||
|
||||
let min
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--| Multiply all the numbers in a `List`
|
||||
let Integer/multiply =
|
||||
https://prelude.dhall-lang.org/Integer/multiply.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/multiply.dhall
|
||||
sha256:dcb1ed7c8475ece8d67db92cd249fc728541778ff82509e28c3760e341880e4d
|
||||
|
||||
let product
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
let List/concatMap =
|
||||
https://prelude.dhall-lang.org/List/concatMap.dhall
|
||||
sha256:3b2167061d11fda1e4f6de0522cbe83e0d5ac4ef5ddf6bb0b2064470c5d3fb64
|
||||
|
||||
let Optional/toList =
|
||||
https://prelude.dhall-lang.org/Optional/toList.dhall
|
||||
sha256:d78f160c619119ef12389e48a629ce293d69f7624c8d016b7a4767ab400344c4
|
||||
|
||||
let filterMap
|
||||
: ∀(a : Type) → ∀(b : Type) → (a → Optional b) → List a → List b
|
||||
= λ(a : Type) →
|
||||
λ(b : Type) →
|
||||
λ(f : a → Optional b) →
|
||||
List/concatMap a b (λ(x : a) → Optional/toList b (f x))
|
||||
|
||||
in filterMap
|
|
@ -1,4 +0,0 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
{ -- TODO: checkListOfEnum
|
||||
filterMap = ./filterMap.dhall
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let Function/identity =
|
||||
https://prelude.dhall-lang.org/Function/identity.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Function/identity.dhall
|
||||
sha256:f78b96792b459cb664f41c6119bd8897dd04353a3343521d436cd82ad71cb4d4
|
||||
|
||||
let throw = ./throw.dhall nix
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let Bool/not =
|
||||
https://prelude.dhall-lang.org/Bool/not.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Bool/not.dhall
|
||||
sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4
|
||||
|
||||
let throwIf = ./throwIf.dhall nix
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let Function/identity =
|
||||
https://prelude.dhall-lang.org/Function/identity.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Function/identity.dhall
|
||||
sha256:f78b96792b459cb664f41c6119bd8897dd04353a3343521d436cd82ad71cb4d4
|
||||
|
||||
let warn = ./warn.dhall nix
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let Bool/not =
|
||||
https://prelude.dhall-lang.org/Bool/not.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Bool/not.dhall
|
||||
sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4
|
||||
|
||||
let warnIf = ./warnIf.dhall nix
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
let lessThan =
|
||||
https://prelude.dhall-lang.org/Natural/lessThan.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Natural/lessThan.dhall
|
||||
sha256:3381b66749290769badf8855d8a3f4af62e8de52d1364d838a9d1e20c94fa70c
|
||||
|
||||
let greaterThan =
|
||||
https://prelude.dhall-lang.org/Natural/greaterThan.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Natural/greaterThan.dhall
|
||||
sha256:f702abcdfcd7ad73619b9285d7e41c3a1d017fb6b8d037cf40bd93bf30c09b2c
|
||||
|
||||
let compare
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Any = ../Any/Type.dhall
|
||||
|
||||
let Integer/nonNegative =
|
||||
https://prelude.dhall-lang.org/Integer/nonNegative.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/nonNegative.dhall
|
||||
sha256:b463373f070df6b1c8c7082051e0810fee38b360bab35256187c8c2b6af5c663
|
||||
|
||||
let Misc/throw = ../Misc/throw.dhall nix
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
let Any = ../Any/Type.dhall
|
||||
|
||||
let lessThan =
|
||||
https://prelude.dhall-lang.org/Natural/lessThan.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Natural/lessThan.dhall
|
||||
sha256:3381b66749290769badf8855d8a3f4af62e8de52d1364d838a9d1e20c94fa70c
|
||||
|
||||
let greaterThanEqual =
|
||||
https://prelude.dhall-lang.org/Natural/greaterThanEqual.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Natural/greaterThanEqual.dhall
|
||||
sha256:30ebfab0febd7aa0ccccfdf3dc36ee6d50f0117f35dd4a9b034750b7e885a1a4
|
||||
|
||||
let subtract =
|
||||
https://prelude.dhall-lang.org/Natural/subtract.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Natural/subtract.dhall
|
||||
sha256:b9277ac637d09142a3a3ac79137ef5955c42f8b33b6746d59db2c9d75ccdd745
|
||||
|
||||
let Any/toAny = ../Any/toAny.dhall nix
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
λ(nix : ../NixPrelude.dhall) →
|
||||
let List/index =
|
||||
https://prelude.dhall-lang.org/List/index.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/List/index.dhall
|
||||
sha256:e657b55ecae4d899465c3032cb1a64c6aa6dc2aa3034204f3c15ce5c96c03e63
|
||||
|
||||
let Optional/default =
|
||||
https://prelude.dhall-lang.org/Optional/default.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/default.dhall
|
||||
sha256:5bd665b0d6605c374b3c4a7e2e2bd3b9c1e39323d41441149ed5e30d86e889ad
|
||||
|
||||
let toBaseDigits = ./toBaseDigits.dhall nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Number = ./Type.dhall
|
||||
|
||||
let Bool/not =
|
||||
https://prelude.dhall-lang.org/Bool/not.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Bool/not.dhall
|
||||
sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4
|
||||
|
||||
let Number/lessThanEqual = ./lessThanEqual.dhall nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Number = ./Type.dhall
|
||||
|
||||
let Bool/not =
|
||||
https://prelude.dhall-lang.org/Bool/not.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Bool/not.dhall
|
||||
sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4
|
||||
|
||||
let Number/lessThan = ./lessThan.dhall nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Number = ./Type.dhall
|
||||
|
||||
let Optional/map =
|
||||
https://prelude.dhall-lang.org/Optional/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/map.dhall
|
||||
sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa
|
||||
|
||||
let max = ./max.dhall nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Number = ./Type.dhall
|
||||
|
||||
let Optional/map =
|
||||
https://prelude.dhall-lang.org/Optional/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Optional/map.dhall
|
||||
sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa
|
||||
|
||||
let min = ./min.dhall nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let Number = ./Type.dhall
|
||||
|
||||
let Bool/not =
|
||||
https://prelude.dhall-lang.org/Bool/not.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Bool/not.dhall
|
||||
sha256:723df402df24377d8a853afed08d9d69a0a6d86e2e5b2bac8960b0d4756c7dc4
|
||||
|
||||
let Number/nonPositive = ./nonPositive.dhall nix
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
let Set = ./Type.dhall
|
||||
|
||||
let Map =
|
||||
https://prelude.dhall-lang.org/Map/Type.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Map/Type.dhall
|
||||
sha256:210c7a9eba71efbb0f7a66b3dcf8b9d3976ffc2bc0e907aadfb6aa29c333e8ed
|
||||
|
||||
let Entry =
|
||||
https://prelude.dhall-lang.org/Map/Entry.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Map/Entry.dhall
|
||||
sha256:f334283bdd9cd88e6ea510ca914bc221fc2dab5fb424d24514b2e0df600d5346
|
||||
|
||||
let List/map =
|
||||
https://prelude.dhall-lang.org/List/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/List/map.dhall
|
||||
sha256:dd845ffb4568d40327f2a817eb42d1c6138b929ca758d50bc33112ef3c885680
|
||||
|
||||
let setToMap
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
let Set = ./Type.dhall
|
||||
|
||||
let Map =
|
||||
https://prelude.dhall-lang.org/Map/Type.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Map/Type.dhall
|
||||
sha256:210c7a9eba71efbb0f7a66b3dcf8b9d3976ffc2bc0e907aadfb6aa29c333e8ed
|
||||
|
||||
let Entry =
|
||||
https://prelude.dhall-lang.org/Map/Entry.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Map/Entry.dhall
|
||||
sha256:f334283bdd9cd88e6ea510ca914bc221fc2dab5fb424d24514b2e0df600d5346
|
||||
|
||||
let List/map =
|
||||
https://prelude.dhall-lang.org/List/map.dhall
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/List/map.dhall
|
||||
sha256:dd845ffb4568d40327f2a817eb42d1c6138b929ca758d50bc33112ef3c885680
|
||||
|
||||
let Any/toAny = ../Any/toAny.dhall nix
|
||||
|
|
23
flake.nix
23
flake.nix
|
@ -20,15 +20,30 @@
|
|||
dhall-haskell,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system; overlays = [ self.overlays.${system}.default ];};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.${system}.default];
|
||||
};
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
packages = rec {
|
||||
inherit (import "${dhall-haskell}/nix/shared.nix" { inherit system; }) dhall dhall-nix dhall-nixpkgs;
|
||||
inherit (import "${dhall-haskell}/nix/shared.nix" {inherit system;}) dhall dhall-nix dhall-nixpkgs;
|
||||
dhall-nix-lib = pkgs.dhallPackages.callPackage ./package.nix {};
|
||||
};
|
||||
overlays.default = (_: _: self.packages.${system});
|
||||
overlays.default = _: prev:
|
||||
self.packages.${system}
|
||||
// {
|
||||
dhallPackages = prev.dhallPackages.override (self: {
|
||||
overrides = self: super: {
|
||||
Prelude = super.Prelude.overridePackage {
|
||||
rev = "v22.0.0";
|
||||
sha256 = "157x95yw9hibpifa8figawgclnc1d1bapmbp1zw60l2viy936b83";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [ self.packages.${system}.dhall self.packages.${system}.dhall-nix];
|
||||
nativeBuildInputs = [self.packages.${system}.dhall self.packages.${system}.dhall-nix];
|
||||
};
|
||||
lib.dhallToNix = import ./dhallToNix.nix {inherit pkgs;};
|
||||
});
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
λ(nix : ./NixPrelude.dhall) →
|
||||
https://prelude.dhall-lang.org/package.dhall
|
||||
sha256:0fed19a88330e9a8a3fbe1e8442aa11d12e38da51eb12ba8bcb56f3c25d0854a
|
||||
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/package.dhall
|
||||
sha256:1c7622fdc868fe3a23462df3e6f533e50fdc12ecf3b42c0bb45c328ec8c4293e
|
||||
∧ { Any = ./Any/package.dhall nix
|
||||
, Bool = ./Bool/package.dhall nix
|
||||
, Double = ./Double/package.dhall nix
|
||||
, Function = ./Function/package.dhall nix
|
||||
, Integer = ./Integer/package.dhall nix
|
||||
, List = ./List/package.dhall nix
|
||||
, Misc = ./Misc/package.dhall nix
|
||||
, Natural = ./Natural/package.dhall nix
|
||||
, Number = ./Number/package.dhall nix
|
||||
|
|
40
package.nix
Normal file
40
package.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
buildDhallDirectoryPackage,
|
||||
Prelude,
|
||||
}:
|
||||
buildDhallDirectoryPackage {
|
||||
name = ".";
|
||||
src = ./.;
|
||||
file = "package.dhall";
|
||||
source = false;
|
||||
document = false;
|
||||
dependencies = [
|
||||
(Prelude.overridePackage {file = "package.dhall";})
|
||||
(Prelude.overridePackage {file = "Optional/fold.dhall";})
|
||||
(Prelude.overridePackage {file = "Bool/not.dhall";})
|
||||
(Prelude.overridePackage {file = "Optional/map.dhall";})
|
||||
(Prelude.overridePackage {file = "Map/Type.dhall";})
|
||||
(Prelude.overridePackage {file = "Map/Entry.dhall";})
|
||||
(Prelude.overridePackage {file = "List/map.dhall";})
|
||||
(Prelude.overridePackage {file = "List/foldLeft.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/add.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/negate.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/lessThan.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/greaterThan.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/negative.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/abs.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/nonPositive.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/nonNegative.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/lessThanEqual.dhall";})
|
||||
(Prelude.overridePackage {file = "Integer/multiply.dhall";})
|
||||
(Prelude.overridePackage {file = "List/concatMap.dhall";})
|
||||
(Prelude.overridePackage {file = "Optional/toList.dhall";})
|
||||
(Prelude.overridePackage {file = "Function/identity.dhall";})
|
||||
(Prelude.overridePackage {file = "Natural/lessThan.dhall";})
|
||||
(Prelude.overridePackage {file = "Natural/greaterThan.dhall";})
|
||||
(Prelude.overridePackage {file = "Natural/greaterThanEqual.dhall";})
|
||||
(Prelude.overridePackage {file = "Natural/subtract.dhall";})
|
||||
(Prelude.overridePackage {file = "List/index.dhall";})
|
||||
(Prelude.overridePackage {file = "Optional/default.dhall";})
|
||||
];
|
||||
}
|
|
@ -5,7 +5,7 @@ let Set = ./Set/Type.dhall
|
|||
in { equal : Any → Any → Bool
|
||||
, fix : ∀(t : Type) → (t → t) → t
|
||||
, `fix'` : (Set → Set) → Set
|
||||
, ignoreOtherArgs : ∀(A: Type) → ∀(B: Type) → (A → B) → A → B
|
||||
, ignoreOtherArgs : ∀(A : Type) → ∀(B : Type) → (A → B) → A → B
|
||||
, mergeAttrs : Set → Set → Set
|
||||
, toAny : ∀(t : Type) → ∀(v : t) → Any
|
||||
, toTypeUnchecked : ∀(t : Type) → ∀(v : Any) → t
|
||||
|
|
|
@ -2,12 +2,13 @@ lib: {
|
|||
primops = {
|
||||
equal = a: b: a == b;
|
||||
fix = _: f: let x = f x; in x;
|
||||
fix' = f: let x = f x // { __unfix__ = f; }; in x;
|
||||
fix' = f: let x = f x // {__unfix__ = f;}; in x;
|
||||
ignoreOtherArgs = _: _: f: let
|
||||
args = lib.trivial.functionArgs f;
|
||||
filterFunction = k: _: builtins.hasAttrs k set;
|
||||
filteredFunction = s: f (lib.attrsets.filterAttrs filterFunction s);
|
||||
in lib.trivial.setFunctionArgs filteredFunction args;
|
||||
in
|
||||
lib.trivial.setFunctionArgs filteredFunction args;
|
||||
mergeAttrs = a: b: a // b;
|
||||
toAny = _: v: v;
|
||||
toTypeUnchecked = _: v: v;
|
||||
|
|
Loading…
Reference in a new issue