- numberTree :: ((RTree a) -> RTree (Int, a))
- numberTree = flip evalState zero o foldTree \a cs->
- (\lvs i->RNode (i, a) lvs) <$> 'CM'.sequence cs <*> getState <* modify inc
-
-
-
-
-
- =
-
-directoryShare :: ROShared FilePath [(FilePath, MaybeOSError FileInfo)]
-directoryShare = SDSSource {SDSSource | name = "directoryShare", read = read, write=write}
-where
- read p iw
- # (merr, iw) = liftIWorld (readDirectory p) iw
- | isError merr = (liftError (first exception merr), iw)
- # (Ok files) = merr
- # (fis, iw) = liftIWorld (seqList (map getFileInfo files)) iw
- = (Ok $ sortBy fst [(f, fi)\\f<-files & fi<-fis], iw)
-
- write p w iw = (Ok (const (const False)), iw)
-//import iTasks
-//import iTasks.Extensions.Files
-//
-//Start w = startEngine (
-// selectFile "/opt/clean/lib" () False []
-// >&> viewSharedInformation "Selection" []) w
+numberTree :: ((RTree a) -> RTree (Int, a))
+numberTree = flip evalState zero o foldTree \a cs->
+ (\lvs i->RNode (i, a) lvs) <$> 'CM'.sequence cs <*> getState <* modify inc