parent
3acc67ba66
commit
cacbfdbd6d
|
@ -175,6 +175,7 @@ builtinsList = sequence
|
||||||
, add2 Normal "catAttrs" catAttrs
|
, add2 Normal "catAttrs" catAttrs
|
||||||
, add2 Normal "compareVersions" compareVersions_
|
, add2 Normal "compareVersions" compareVersions_
|
||||||
, add Normal "concatLists" concatLists
|
, add Normal "concatLists" concatLists
|
||||||
|
, add2 Normal "concatMap" concatMap_
|
||||||
, add' Normal "concatStringsSep" (arity2 principledIntercalateNixString)
|
, add' Normal "concatStringsSep" (arity2 principledIntercalateNixString)
|
||||||
, add0 Normal "currentSystem" currentSystem
|
, add0 Normal "currentSystem" currentSystem
|
||||||
, add0 Normal "currentTime" currentTime_
|
, add0 Normal "currentTime" currentTime_
|
||||||
|
@ -1162,6 +1163,20 @@ concatLists =
|
||||||
>=> toValue
|
>=> toValue
|
||||||
. concat
|
. concat
|
||||||
|
|
||||||
|
concatMap_
|
||||||
|
:: forall e t f m
|
||||||
|
. MonadNix e t f m
|
||||||
|
=> NValue t f m
|
||||||
|
-> NValue t f m
|
||||||
|
-> m (NValue t f m)
|
||||||
|
concatMap_ f =
|
||||||
|
fromValue @[NValue t f m]
|
||||||
|
>=> traverse applyFunc
|
||||||
|
>=> toValue . concat
|
||||||
|
where
|
||||||
|
applyFunc :: NValue t f m -> m [NValue t f m]
|
||||||
|
applyFunc = (f `callFunc`) >=> fromValue
|
||||||
|
|
||||||
listToAttrs
|
listToAttrs
|
||||||
:: forall e t f m . MonadNix e t f m => NValue t f m -> m (NValue t f m)
|
:: forall e t f m . MonadNix e t f m => NValue t f m -> m (NValue t f m)
|
||||||
listToAttrs = fromValue @[NValue t f m] >=> \l ->
|
listToAttrs = fromValue @[NValue t f m] >=> \l ->
|
||||||
|
|
|
@ -70,7 +70,6 @@ newFailingTests = Set.fromList
|
||||||
[ "eval-okay-path"
|
[ "eval-okay-path"
|
||||||
, "eval-okay-fromTOML"
|
, "eval-okay-fromTOML"
|
||||||
, "eval-okay-context-introspection"
|
, "eval-okay-context-introspection"
|
||||||
, "eval-okay-concatmap"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
genTests :: IO TestTree
|
genTests :: IO TestTree
|
||||||
|
|
Loading…
Reference in New Issue