diff options
author | Ian Lynagh <igloo@earth.li> | 2011-03-22 18:21:12 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-03-22 18:21:12 +0000 |
commit | 90d7a88f304ddff15f31f9b1edb86b452679583b (patch) | |
tree | 9d9aa50dc08e35b72435f0b7a443a6c10f8e9f6f /distrib/compare/FilenameDescr.hs | |
parent | cb28985ec37f65a8fee697e2b6d359626a44a41a (diff) | |
download | haskell-90d7a88f304ddff15f31f9b1edb86b452679583b.tar.gz |
bindist checker improvements
* Some refactoring
* Support for Windows filenames
* Some support for installed trees (as Windows "bindists" are really
install trees)
Diffstat (limited to 'distrib/compare/FilenameDescr.hs')
-rw-r--r-- | distrib/compare/FilenameDescr.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/distrib/compare/FilenameDescr.hs b/distrib/compare/FilenameDescr.hs index 4b5898e990..c1a85954e6 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,9 @@ 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 (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 = Right $ intercalate "-" $ biWays buildInfo |