-- abstracts out the version numbers.
type FilenameDescr = [FilenameDescrBit]
data FilenameDescrBit = VersionOf String
+ | HashOf String
| FP String
| Ways
deriving (Show, Eq, Ord)
= case lookup thing (biThingVersionMap buildInfo) of
Just v -> Right v
Nothing -> Left ["Can't happen: thing has no version in mapping"]
- f Ways = Right $ intercalate "-" $ biWays buildInfo
+ f (HashOf thing)
+ = case lookup thing (biThingHashMap buildInfo) of
+ Just v -> Right v
+ Nothing -> Left ["Can't happen: thing has no hash in mapping"]
+ f Ways = case biMaybeWays buildInfo of
+ Just ways -> Right $ intercalate "-" ways
+ Nothing -> Left ["Can't happen: No ways, but Ways is used"]