diff options
author | Joey Hess <joeyh@joeyh.name> | 2019-12-05 14:36:43 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2019-12-05 14:41:18 -0400 |
commit | c20f4704a7813ed90ffd4b7be7a7de6192f9eac5 (patch) | |
tree | b8f39363b347304ceef324470c1de0d6192ebd44 /Types/UUID.hs | |
parent | 718fa83da64b2881b18e2dfe134b3c8991c7e607 (diff) |
all commands building except for assistant
also, changed ConfigValue to a newtype, and moved it into Git.Config.
Diffstat (limited to 'Types/UUID.hs')
-rw-r--r-- | Types/UUID.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Types/UUID.hs b/Types/UUID.hs index 726875b3a8..92f5ed9e17 100644 --- a/Types/UUID.hs +++ b/Types/UUID.hs @@ -17,6 +17,7 @@ import Data.String import Data.ByteString.Builder import qualified Data.Semigroup as Sem +import Git.Types (ConfigValue(..)) import Utility.FileSystemEncoding import Utility.QuickCheck import qualified Utility.SimpleProtocol as Proto @@ -52,6 +53,12 @@ instance FromUUID String where instance ToUUID String where toUUID s = toUUID (encodeBS' s) +instance FromUUID ConfigValue where + fromUUID s = (ConfigValue (fromUUID s)) + +instance ToUUID ConfigValue where + toUUID (ConfigValue v) = toUUID v + -- There is no matching FromUUID U.UUID because a git-annex UUID may -- be NoUUID or perhaps contain something not allowed in a canonical UUID. instance ToUUID U.UUID where |