From bac84ecbcd8063609c351ced880fc71ab42b0692 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 14 Mar 2013 15:28:11 -0400 Subject: [PATCH] some hamlet versions do not support nested tuples --- Assistant/WebApp/RepoList.hs | 7 ++++--- templates/configurators/intro.hamlet | 2 +- templates/configurators/repositories/list.hamlet | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Assistant/WebApp/RepoList.hs b/Assistant/WebApp/RepoList.hs index fb33c9931d..a138607a04 100644 --- a/Assistant/WebApp/RepoList.hs +++ b/Assistant/WebApp/RepoList.hs @@ -118,8 +118,8 @@ repoListDisplay reposelector = do where ident = "repolist" --- (num, name, (uuid, actions)) -type RepoList = [(String, String, (UUID, Actions))] +-- (num, name, uuid, actions) +type RepoList = [(String, String, UUID, Actions)] {- A numbered list of known repositories, - with actions that can be taken on them. -} @@ -179,10 +179,11 @@ repoList reposelector val iscloud r = Just (iscloud, (u, DisabledRepoActions $ r u)) list l = liftAnnex $ do let l' = nubBy (\x y -> fst x == fst y) l - zip3 + l'' <- zip3 <$> pure counter <*> Remote.prettyListUUIDs (map fst l') <*> pure l' + return $ map (\(num, name, (uuid, actions)) -> (num, name, uuid, actions)) l'' counter = map show ([1..] :: [Int]) getEnableSyncR :: UUID -> Handler () diff --git a/templates/configurators/intro.hamlet b/templates/configurators/intro.hamlet index f3651c4cb9..0239bade43 100644 --- a/templates/configurators/intro.hamlet +++ b/templates/configurators/intro.hamlet @@ -13,7 +13,7 @@ \ with these repositories: - $forall (num, name, _) <- repolist + $forall (num, name, _, _) <- repolist
#{num} diff --git a/templates/configurators/repositories/list.hamlet b/templates/configurators/repositories/list.hamlet index 7b239aaa9a..9457d5af89 100644 --- a/templates/configurators/repositories/list.hamlet +++ b/templates/configurators/repositories/list.hamlet @@ -11,7 +11,7 @@ Repositories - $forall (_num, name, (uuid, actions)) <- repolist + $forall (_num, name, uuid, actions) <- repolist