clean-up: Builtins.hs: nixPath: simplify parens

This commit is contained in:
Anton-Latukha 2020-09-18 18:15:56 +03:00
parent 55b0040384
commit c01e156fef
No known key found for this signature in database
GPG key ID: 3D84C07E91802E41

View file

@ -328,16 +328,17 @@ foldNixPath f z = do
nixPath :: MonadNix e t f m => m (NValue t f m) nixPath :: MonadNix e t f m => m (NValue t f m)
nixPath = fmap nvList $ flip foldNixPath [] $ \p mn ty rest -> nixPath = fmap nvList $ flip foldNixPath [] $ \p mn ty rest ->
pure pure
$ (flip nvSet mempty $ M.fromList $ flip nvSet mempty ( M.fromList
[ case ty of [ case ty of
PathEntryPath -> ("path", nvPath p) PathEntryPath -> ("path", nvPath p)
PathEntryURI -> PathEntryURI ->
( "uri" ( "uri"
, nvStr (hackyMakeNixStringWithoutContext (Text.pack p)) , nvStr $ hackyMakeNixStringWithoutContext $ Text.pack p
) )
, ( "prefix" , ( "prefix"
, nvStr , nvStr
(hackyMakeNixStringWithoutContext $ Text.pack (fromMaybe "" mn)) $ hackyMakeNixStringWithoutContext $ Text.pack $ fromMaybe "" mn
) )
] ]
) )