more OsPath conversion
Sponsored-by: Jack Hill
This commit is contained in:
parent
a03c609268
commit
c69e57aede
17 changed files with 83 additions and 91 deletions
|
@ -24,6 +24,7 @@ import Git.Types (ConfigValue(..))
|
|||
import Utility.FileSystemEncoding
|
||||
import Utility.QuickCheck
|
||||
import Utility.Aeson
|
||||
import Utility.OsPath
|
||||
import qualified Utility.SimpleProtocol as Proto
|
||||
|
||||
-- A UUID is either an arbitrary opaque string, or UUID info may be missing.
|
||||
|
@ -101,6 +102,9 @@ buildUUID NoUUID = mempty
|
|||
isUUID :: String -> Bool
|
||||
isUUID = isJust . U.fromString
|
||||
|
||||
uuidPath :: UUID -> OsPath
|
||||
uuidPath u = toOsPath (fromUUID u :: SB.ShortByteString)
|
||||
|
||||
-- A description of a UUID.
|
||||
newtype UUIDDesc = UUIDDesc B.ByteString
|
||||
deriving (Eq, Sem.Semigroup, Monoid, IsString)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue