From dc748c7336aea9cbf04c0311098a44c2b329633d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Apr 2014 20:13:35 -0400 Subject: reinit: New command that can initialize a new reposotory using the configuration of a previously known repository. Useful if a repository got deleted and you want to clone it back the way it was. --- Types/UUID.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Types') diff --git a/Types/UUID.hs b/Types/UUID.hs index 8a304dffa..df3884059 100644 --- a/Types/UUID.hs +++ b/Types/UUID.hs @@ -8,6 +8,8 @@ module Types.UUID where import qualified Data.Map as M +import qualified Data.UUID as U +import Data.Maybe -- A UUID is either an arbitrary opaque string, or UUID info may be missing. data UUID = NoUUID | UUID String @@ -21,4 +23,7 @@ toUUID :: String -> UUID toUUID [] = NoUUID toUUID s = UUID s +isUUID :: String -> Bool +isUUID = isJust . U.fromString + type UUIDMap = M.Map UUID String -- cgit v1.2.3