summaryrefslogtreecommitdiff
path: root/UUID.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-13 23:18:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-13 23:18:58 -0400
commit8ab54401b609f49a603f3ed69bb8493a53f28db8 (patch)
tree62daa0a055863b557138ce5adf1231926f3165ae /UUID.hs
parent64b5167b0f9620bd96cd57b58f0e40be741e5420 (diff)
update
Diffstat (limited to 'UUID.hs')
-rw-r--r--UUID.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/UUID.hs b/UUID.hs
index 5c9f9179e..af6003bfb 100644
--- a/UUID.hs
+++ b/UUID.hs
@@ -10,7 +10,8 @@ module UUID (
getUUID,
prepUUID,
genUUID,
- reposByUUID
+ reposByUUID,
+ prettyPrintUUIDs
) where
import Control.Monad.State
@@ -71,3 +72,10 @@ reposByUUID repos uuids = do
match r = do
u <- getUUID r
return $ isJust $ elemIndex u uuids
+
+{- Pretty-prints a list of UUIDs
+ - TODO: use lookup file to really show pretty names. -}
+prettyPrintUUIDs :: [UUID] -> String
+prettyPrintUUIDs uuids =
+ unwords $ map (\u -> "\tUUID "++u++"\n") uuids
+