diff options
Diffstat (limited to 'Types/UUID.hs')
-rw-r--r-- | Types/UUID.hs | 5 |
1 files changed, 5 insertions, 0 deletions
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 |