@@ -316,15 +316,15 @@ foldNixPath
316316foldNixPath f z = do
317317 mres <- lookupVar " __includes"
318318 dirs <- case mres of
319- Nothing -> pure []
319+ Nothing -> pure mempty
320320 Just v -> demand v $ fromValue . Deeper
321321 mPath <- getEnvVar " NIX_PATH"
322322 mDataDir <- getEnvVar " NIX_DATA_DIR"
323323 dataDir <- maybe getDataDir pure mDataDir
324324 foldrM go z
325325 $ fmap (fromInclude . stringIgnoreContext) dirs
326326 <> case mPath of
327- Nothing -> []
327+ Nothing -> mempty
328328 Just str -> uriAwareSplit (Text. pack str)
329329 <> [ fromInclude $ Text. pack $ " nix=" <> dataDir <> " /nix/corepkgs" ]
330330 where
@@ -336,7 +336,7 @@ foldNixPath f z = do
336336 _ -> throwError $ ErrorCall $ " Unexpected entry in NIX_PATH: " <> show x
337337
338338nixPath :: MonadNix e t f m => m (NValue t f m )
339- nixPath = fmap nvList $ flip foldNixPath [] $ \ p mn ty rest ->
339+ nixPath = fmap nvList $ flip foldNixPath mempty $ \ p mn ty rest ->
340340 pure
341341 $ flip nvSet mempty ( M. fromList
342342 [ case ty of
@@ -512,7 +512,7 @@ versionComponentSeparators = ".-"
512512
513513splitVersion :: Text -> [VersionComponent ]
514514splitVersion s = case Text. uncons s of
515- Nothing -> []
515+ Nothing -> mempty
516516 Just (h, t)
517517 | h `elem` versionComponentSeparators
518518 -> splitVersion t
@@ -575,7 +575,7 @@ splitDrvName s =
575575 breakAfterFirstItem :: (a -> Bool ) -> [a ] -> ([a ], [a ])
576576 breakAfterFirstItem f = \ case
577577 h : t -> let (a, b) = break f t in (h : a, b)
578- [] -> ([] , [] )
578+ [] -> (mempty , mempty )
579579 (namePieces, versionPieces) =
580580 breakAfterFirstItem isFirstVersionPiece pieces
581581 in
@@ -910,7 +910,7 @@ genericClosure = fromValue @(AttrSet (NValue t f m)) >=> \s ->
910910 -> [NValue t f m ]
911911 -> Set (WValue t f m )
912912 -> m (Set (WValue t f m ), [NValue t f m ])
913- go _ [] ks = pure (ks, [] )
913+ go _ [] ks = pure (ks, mempty )
914914 go op (t : ts) ks = demand t $ \ v -> fromValue @ (AttrSet (NValue t f m )) v >>= \ s -> do
915915 k <- attrsetGet " key" s
916916 demand k $ \ k' -> do
@@ -1480,7 +1480,7 @@ appendContext x y = demand x $ \x' -> demand y $ \y' -> case (x', y') of
14801480 allOutputs <- maybe (pure False ) (demand ?? fromValue)
14811481 $ M. lookup " allOutputs" attrs
14821482 outputs <- case M. lookup " outputs" attrs of
1483- Nothing -> pure []
1483+ Nothing -> pure mempty
14841484 Just os -> demand os $ \ case
14851485 NVList vs ->
14861486 forM vs $ fmap stringIgnoreContext . fromValue
0 commit comments