Skip to content

Commit 6ce1fb1

Browse files
authored
(#1031) Builtins: add floor & ceil
1 parent 4ca4b94 commit 6ce1fb1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Nix/Builtins.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,6 +1833,7 @@ builtinsList =
18331833
, add2 Normal "bitXor" bitXorNix
18341834
, add0 Normal "builtins" builtinsBuiltinNix
18351835
, add2 Normal "catAttrs" catAttrsNix
1836+
, add' Normal "ceil" (arity1 (ceiling @Float @Integer))
18361837
, add2 Normal "compareVersions" compareVersionsNix
18371838
, add Normal "concatLists" concatListsNix
18381839
, add2 Normal "concatMap" concatMapNix
@@ -1852,6 +1853,7 @@ builtinsList =
18521853
, add2 Normal "filter" filterNix
18531854
--, add Normal "filterSource" filterSource
18541855
, add2 Normal "findFile" findFileNix
1856+
, add' Normal "floor" (arity1 (floor @Float @Integer))
18551857
, add3 Normal "foldl'" foldl'Nix
18561858
, add Normal "fromJSON" fromJSONNix
18571859
--, add Normal "fromTOML" fromTOML

tests/NixLanguageTests.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ newFailingTests = Set.fromList
6565
, "eval-okay-path-antiquotation"
6666
, "eval-okay-groupBy"
6767
, "eval-okay-getattrpos-functionargs"
68-
, "eval-okay-floor-ceil"
6968
, "eval-okay-attrs6"
7069
]
7170

0 commit comments

Comments
 (0)