Virtual desktop underlay for Wayland and X11
git clone https://github.com/m-col/xanadu
Files | Refs | Readme | License

Commit 541956b8e78b2a1bcd0f96965d8dbd0c2cdc2ba0
Parent: 6c7c3b45fa71f88a81a76ac4f8aa674bcf13af26
Author: mcol <mcol@posteo.net>
Date: 2021-08-19 11:11:19 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2021-08-19 11:11:19 +0100

Simplify populate function

src/Main.hs Modified

@@ -41,13 +41,7 @@
     return ()
 
 populate :: Gtk.ListStore -> FilePath -> IO ()
-populate listStore root = do
-    contents <- ls root
-    addItems contents
-    return ()
-  where
-    addItems :: [FilePath] -> IO [()]
-    addItems paths = sequence $ map (addItem listStore) paths
+populate listStore root = ls root >>= mconcat . map (addItem listStore)
 
 addItem :: Gtk.ListStore -> FilePath -> IO ()
 addItem listStore path = do