diff options
| author | Xe Iaso <me@christine.website> | 2022-11-24 16:01:26 -0500 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-11-24 16:01:26 -0500 |
| commit | 6ddbc8d847e38b60a394e5c8ba054873e3c2cda3 (patch) | |
| tree | 1d6bd59732fb0eb9c9101fbbb7dcee46348f4b8f | |
| parent | 18fcf051499912f17dd49bc0413e1de58b2d44f2 (diff) | |
| download | xesite-6ddbc8d847e38b60a394e5c8ba054873e3c2cda3.tar.xz xesite-6ddbc8d847e38b60a394e5c8ba054873e3c2cda3.zip | |
fix nix builds
Signed-off-by: Xe Iaso <me@christine.website>
| -rw-r--r-- | dhall/Prelude.dhall | 2 | ||||
| -rw-r--r-- | dhall/Prelude/LICENSE | 27 | ||||
| -rw-r--r-- | dhall/Prelude/package.dhall | 16743 | ||||
| -rw-r--r-- | flake.nix | 5 |
4 files changed, 16774 insertions, 3 deletions
diff --git a/dhall/Prelude.dhall b/dhall/Prelude.dhall index f1f4324..8dbfa44 100644 --- a/dhall/Prelude.dhall +++ b/dhall/Prelude.dhall @@ -1,3 +1,3 @@ - env:DHALL_PRELUDE + ./Prelude/package.dhall ? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v20.1.0/Prelude/package.dhall sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98 diff --git a/dhall/Prelude/LICENSE b/dhall/Prelude/LICENSE new file mode 100644 index 0000000..d240dd1 --- /dev/null +++ b/dhall/Prelude/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2018 Gabriel Gonzalez +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the author nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dhall/Prelude/package.dhall b/dhall/Prelude/package.dhall new file mode 100644 index 0000000..a7ee369 --- /dev/null +++ b/dhall/Prelude/package.dhall @@ -0,0 +1,16743 @@ +{ Bool = + { and = + \(_ : List Bool) -> + List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 && _) True + , build = \(_ : Type -> _ -> _@1 -> _@2) -> _ Bool True False + , even = + \(_ : List Bool) -> + List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 == _) True + , fold = + \(_ : Bool) -> + \(_ : Type) -> + \(_ : _) -> + \(_ : _@1) -> + if _@3 then _@1 else _ + , not = \(_ : Bool) -> _ == False + , odd = + \(_ : List Bool) -> + List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 != _) False + , or = + \(_ : List Bool) -> + List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 || _) False + , show = \(_ : Bool) -> if _ then "True" else "False" + } +, Double.show = Double/show +, Function = + { compose = + \(_ : Type) -> + \(_ : Type) -> + \(_ : Type) -> + \(_ : _@2 -> _@2) -> + \(_ : _@2 -> _@2) -> + \(_ : _@4) -> + _@1 (_@2 _) + , identity = \(_ : Type) -> \(_ : _) -> _ + } +, Integer = + { abs = + \(_ : Integer) -> + if Natural/isZero (Integer/clamp _) + then Integer/clamp (Integer/negate _) + else Integer/clamp _ + , add = + \(_ : Integer) -> + \(_ : Integer) -> + if Natural/isZero (Integer/clamp (Integer/negate _@1)) + then if Natural/isZero (Integer/clamp _) + then if Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + ( Integer/clamp + (Integer/negate (Integer/negate _@1)) + ) + ) + then Integer/negate + ( Natural/toInteger + ( Natural/subtract + ( Integer/clamp + (Integer/negate (Integer/negate _@1)) + ) + (Integer/clamp (Integer/negate _)) + ) + ) + else Natural/toInteger + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + ( Integer/clamp + (Integer/negate (Integer/negate _@1)) + ) + ) + else Natural/toInteger + ( Integer/clamp (Integer/negate (Integer/negate _@1)) + + Integer/clamp _ + ) + else if Natural/isZero (Integer/clamp _) + then Integer/negate + ( Natural/toInteger + ( Integer/clamp (Integer/negate _@1) + + Integer/clamp (Integer/negate _) + ) + ) + else if Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _@1)) + (Integer/clamp _) + ) + then Integer/negate + ( Natural/toInteger + ( Natural/subtract + (Integer/clamp _) + (Integer/clamp (Integer/negate _@1)) + ) + ) + else Natural/toInteger + ( Natural/subtract + (Integer/clamp (Integer/negate _@1)) + (Integer/clamp _) + ) + , clamp = Integer/clamp + , equal = + \(_ : Integer) -> + \(_ : Integer) -> + Natural/isZero + (Natural/subtract (Integer/clamp _) (Integer/clamp _@1)) + && Natural/isZero + (Natural/subtract (Integer/clamp _@1) (Integer/clamp _)) + && ( Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + (Integer/clamp (Integer/negate _@1)) + ) + && Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _@1)) + (Integer/clamp (Integer/negate _)) + ) + ) + , greaterThan = + \(_ : Integer) -> + \(_ : Integer) -> + ( if Natural/isZero (Integer/clamp _@1) + then Natural/isZero (Integer/clamp (Integer/negate _)) + || Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _@1)) + (Integer/clamp (Integer/negate _)) + ) + else Natural/isZero + (Natural/subtract (Integer/clamp _) (Integer/clamp _@1)) + ) + == False + , greaterThanEqual = + \(_ : Integer) -> + \(_ : Integer) -> + if Natural/isZero (Integer/clamp _) + then Natural/isZero (Integer/clamp (Integer/negate _@1)) + || Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + (Integer/clamp (Integer/negate _@1)) + ) + else Natural/isZero + (Natural/subtract (Integer/clamp _@1) (Integer/clamp _)) + , lessThan = + \(_ : Integer) -> + \(_ : Integer) -> + ( if Natural/isZero (Integer/clamp _) + then Natural/isZero (Integer/clamp (Integer/negate _@1)) + || Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + (Integer/clamp (Integer/negate _@1)) + ) + else Natural/isZero + (Natural/subtract (Integer/clamp _@1) (Integer/clamp _)) + ) + == False + , lessThanEqual = + \(_ : Integer) -> + \(_ : Integer) -> + if Natural/isZero (Integer/clamp _@1) + then Natural/isZero (Integer/clamp (Integer/negate _)) + || Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _@1)) + (Integer/clamp (Integer/negate _)) + ) + else Natural/isZero + (Natural/subtract (Integer/clamp _) (Integer/clamp _@1)) + , multiply = + \(_ : Integer) -> + \(_ : Integer) -> + if Natural/isZero (Integer/clamp _@1) + then if Natural/isZero (Integer/clamp _) + then Natural/toInteger + ( Integer/clamp (Integer/negate _@1) + * Integer/clamp (Integer/negate _) + ) + else Integer/negate + ( Natural/toInteger + (Integer/clamp (Integer/negate _@1) * Integer/clamp _) + ) + else if Natural/isZero (Integer/clamp _) + then Integer/negate + ( Natural/toInteger + (Integer/clamp _@1 * Integer/clamp (Integer/negate _)) + ) + else Natural/toInteger (Integer/clamp _@1 * Integer/clamp _) + , negate = Integer/negate + , negative = + \(_ : Integer) -> + Natural/isZero (Integer/clamp (Integer/negate _)) == False + , nonNegative = + \(_ : Integer) -> Natural/isZero (Integer/clamp (Integer/negate _)) + , nonPositive = \(_ : Integer) -> Natural/isZero (Integer/clamp _) + , positive = \(_ : Integer) -> Natural/isZero (Integer/clamp _) == False + , show = Integer/show + , subtract = + \(_ : Integer) -> + \(_ : Integer) -> + if Natural/isZero (Integer/clamp _@1) + then if Natural/isZero (Integer/clamp _) + then if Natural/isZero + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + (Integer/clamp (Integer/negate _@1)) + ) + then Integer/negate + ( Natural/toInteger + ( Natural/subtract + (Integer/clamp (Integer/negate _@1)) + (Integer/clamp (Integer/negate _)) + ) + ) + else Natural/toInteger + ( Natural/subtract + (Integer/clamp (Integer/negate _)) + (Integer/clamp (Integer/negate _@1)) + ) + else Natural/toInteger + (Integer/clamp (Integer/negate _@1) + Integer/clamp _) + else if Natural/isZero (Integer/clamp _) + then Integer/negate + ( Natural/toInteger + (Integer/clamp _@1 + Integer/clamp (Integer/negate _)) + ) + else if Natural/isZero + (Natural/subtract (Integer/clamp _@1) (Integer/clamp _)) + then Integer/negate + ( Natural/toInteger + (Natural/subtract (Integer/clamp _) (Integer/clamp _@1)) + ) + else Natural/toInteger + (Natural/subtract (Integer/clamp _@1) (Integer/clamp _)) + , toDouble = Integer/toDouble + , toNatural = + \(_ : Integer) -> + if Natural/isZero (Integer/clamp (Integer/negate _)) + then Some (Integer/clamp _) + else None Natural + } +, JSON = + { Nesting = < Inline | Nested : Text > + , Tagged = + \(_ : Type) -> + { contents : _, field : Text, nesting : < Inline | Nested : Text > } + , Type = + Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + , array = + \ ( _ + : List + ( Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + ) + ) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.array + ( List/fold + ( Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + ) + _@2 + (List _@1) + ( \ ( _ + : Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + ) -> + \(_ : List _@2) -> + [ _@1 _@3 _@2 ] # _ + ) + ([] : List _@1) + ) + , bool = + \(_ : Bool) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.bool _@2 + , double = + \(_ : Double) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.double _@2 + , integer = + \(_ : Integer) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.integer _@2 + , keyText = \(_ : Text) -> \(_ : Text) -> { mapKey = _@1, mapValue = _ } + , keyValue = + \(_ : Type) -> \(_ : Text) -> \(_ : _@1) -> { mapKey = _@1, mapValue = _ } + , natural = + \(_ : Natural) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.integer (Natural/toInteger _@2) + , null = + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.null + , number = + \(_ : Double) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.double _@2 + , object = + \ ( _ + : List + { mapKey : Text + , mapValue : + Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + } + ) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + _.object + ( List/fold + { mapKey : Text + , mapValue : + Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + } + _@2 + (List { mapKey : Text, mapValue : _@1 }) + ( \ ( _ + : { mapKey : Text + , mapValue : + Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + } + ) -> + \(_ : List { mapKey : Text, mapValue : _@2 }) -> + [ { mapKey = _@1.mapKey, mapValue = _@1.mapValue _@3 _@2 } ] + # _ + ) + ([] : List { mapKey : Text, mapValue : _@1 }) + ) + , omitNullFields = + \ ( _ + : Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + ) -> + \(_ : Type) -> + \ ( _ + : { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } + ) -> + ( _@2 + { isNull : Bool, value : _@1 } + { array = + \(_ : List { isNull : Bool, value : _@1 }) -> + { isNull = False + , value = + _@1.array + ( List/fold + { isNull : Bool, value : _@2 } + _ + (List _@2) + ( \(_ : { isNull : Bool, value : _@2 }) -> + \(_ : List _@3) -> + [ _@1.value ] # _ + ) + ([] : List _@2) + ) + } + , bool = \(_ : Bool) -> { isNull = False, value = _@1.bool _ } + , double = \(_ : Double) -> { isNull = False, value = _@1.double _ } + , integer = + \(_ : Integer) -> { isNull = False, value = _@1.integer _ } + , null = { isNull = True, value = _.null } + , object = + \ ( _ + : List + { mapKey : Text + , mapValue : { isNull : Bool, value : _@1 } + } + ) -> + { isNull = False + , value = + _@1.object + ( List/fold + { mapKey : Text + , mapValue : { isNull : Bool, value : _@2 } + } + _ + (List { mapKey : Text, mapValue : _@2 }) + ( \ ( _ + : { mapKey : Text + , mapValue : { isNull : Bool, value : _@2 } + } + ) -> + List/fold + { mapKey : Text, mapValue : _@3 } + ( if _.mapValue.isNull + then [] : List + { mapKey : Text + , mapValue : _@3 + } + else [ _.{ mapKey } + /\ { mapValue = _.mapValue.value } + ] + ) + (List { mapKey : Text, mapValue : _@3 }) + ( \(_ : { mapKey : Text, mapValue : _@3 }) -> + \ ( _ + : List { mapKey : Text, mapValue : _@4 } + ) -> + [ _@1 ] # _ + ) + ) + ([] : List { mapKey : Text, mapValue : _@2 }) + ) + } + , string = \(_ : Text) -> { isNull = False, value = _@1.string _ } + } + ).value + , render = + \ ( _ + : Type -> + { array : List _ -> _@1 + , bool : Bool -> _@1 + , double : Double -> _@1 + , integer : Integer -> _@1 + , null : _ + , object : List { mapKey : Text, mapValue : _ } -> _@1 + , string : Text -> _@1 + } -> + _@1 + ) -> + List/fold + Text + ( [ ( merge + { Complex = \(_ : { head : Text, tail : List Text }) -> _ + , Simple = + \(_ : Text) -> { head = _, tail = [] : List Text } + } + ( _ + < Complex : { head : Text, tail : List Text } + | Simple : Text + > + { array = + \ ( _ + : List + < Complex : { head : Text, tail : List Text } + | Simple : Text + > + ) -> + merge + { None = + < Complex : + { head : Text, tail : List Text } + | Simple : Text + >.Simple + "[]" + , Some = + \ ( _ + : { head : + < Complex : + { head : Text + , tail : List Text + } + | Simple : Text + > + , tail : + List + < Complex : + { head : Text + , tail : List Text + } + | Simple : Text + > + } + ) -> + < Complex : + { head : Text, tail : List Text } + | Simple : Text + >.Complex + ( merge + { None = + { head = + "[ ${( merge + { None = + { head = + merge + { Complex = + \ ( _ + : { head : + Text + , tail : + List + Text + } + ) -> + _ + , Simple = + \ ( _ + : Text + ) -> + { head = + _ + , tail = + [] : List + Text + } + } + _.head + , tail = + List/fold + < Complex : + { head : + Text + , tail : + List + Text + } + | Simple : + Text + > + _.tail + ( List + { head : + Text + , tail : + List + Text + } + ) + ( \ ( _ + : < Complex : + { head : + Text + , tail : + List + Text + } + | Simple : + Text + > + ) -> + \ ( _ + : List + { head : + Text + , tail : + List + Text + } + ) -> + [ merge + { Complex = + \ ( _ + : { head : + Text + , tail : + List + Text + } + ) -> + _ + , Simple = + \ ( _ + : Text + ) -> + { head = + _ + , tail = + [] : List + Text + } + } + _@1 + ] + # _ + ) + ( [] : List + { head : + Text + , tail : + List + Text + } + ) + } + , Some = + \ ( _ + : { init : + List + { head : + Text + , tail : + List + Text + } + , last : + { head : + Text + , tail : + List + Text + } + } + ) -> + { head = + merge + { None = + { head = + "${( merge + { Complex = + \ ( _ + : { head : + Text + , tail : + List + Text + } + ) -> + _ + , Simple = + \ ( _ + : Text + ) -> + { head = + _ + , tail |
