clean up read/show abuse
Avoid ever using read to parse a non-haskell formatted input string. show :: Key is arguably still show abuse, but displaying Keys as filenames is just too useful to give up.
This commit is contained in:
parent
fdf988be6d
commit
b11a63a860
18 changed files with 75 additions and 98 deletions
|
@ -37,7 +37,7 @@ logChange repo _ NoUUID _ = error $
|
|||
{- Returns a list of repository UUIDs that, according to the log, have
|
||||
- the value of a key. -}
|
||||
keyLocations :: Key -> Annex [UUID]
|
||||
keyLocations key = map read <$> (currentLog . logFile) key
|
||||
keyLocations key = map toUUID <$> (currentLog . logFile) key
|
||||
|
||||
{- Finds all keys that have location log information.
|
||||
- (There may be duplicate keys in the list.) -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue