X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=distrib%2Fcompare%2FFilenameDescr.hs;h=d21745cd26bd390679f53792d9fb373f4b1135a4;hb=f537dd87c4a07526e2b1fc1bd1c125d652833641;hp=4b5898e990c441bb9e9a43d141032efabfcdea3c;hpb=42b40db07ce70b89f867247809c4e930fd82a6f6;p=ghc-hetmet.git diff --git a/distrib/compare/FilenameDescr.hs b/distrib/compare/FilenameDescr.hs index 4b5898e..d21745c 100644 --- a/distrib/compare/FilenameDescr.hs +++ b/distrib/compare/FilenameDescr.hs @@ -13,6 +13,7 @@ import Tar -- abstracts out the version numbers. type FilenameDescr = [FilenameDescrBit] data FilenameDescrBit = VersionOf String + | HashOf String | FP String | Ways deriving (Show, Eq, Ord) @@ -45,5 +46,11 @@ flattenFilenameDescr buildInfo fd = case partitionEithers (map f fd) of = 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"]