Skip to content

Commit

Permalink
Merge branch 'lint-progressive'
Browse files Browse the repository at this point in the history
Conflicts:
	Development/Shake/Files.hs
  • Loading branch information
batterseapower committed Feb 8, 2011
2 parents 4187517 + a8093dd commit d86ba65
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 123 deletions.
7 changes: 3 additions & 4 deletions Development/Shake/Composition.hs
Expand Up @@ -99,9 +99,8 @@ instance (Namespace n1, Namespace n2) => Namespace (n1 :+: n2) where
data Snapshot (n1 :+: n2) = UnionSnapshot (Snapshot n1) (Snapshot n2)

takeSnapshot = liftM2 UnionSnapshot takeSnapshot takeSnapshot
compareSnapshots building_ns ns (UnionSnapshot ss1 ss2) (UnionSnapshot ss1' ss2') = compareSnapshots building_ns1 ns1 ss1 ss1' ++ compareSnapshots building_ns2 ns2 ss2 ss2'
where (ns1, ns2) = partitionNames ns
(building_ns1, building_ns2) = partitionNames building_ns
lintSnapshots building_ns sss = lintSnapshots building_ns1 [(ss1, ss1', fst (partitionNames ns)) | (UnionSnapshot ss1 _ss2, UnionSnapshot ss1' _ss2', ns) <- sss] ++ lintSnapshots building_ns2 [(ss2, ss2', snd (partitionNames ns)) | (UnionSnapshot _ss1 ss2, UnionSnapshot _ss1' ss2', ns) <- sss]
where (building_ns1, building_ns2) = partitionNames building_ns

partitionNames :: [n1 :+: n2] -> ([n1], [n2])
partitionNames ns = ([n1 | LeftName n1 <- ns], [n2 | RightName n2 <- ns])
Expand All @@ -124,7 +123,7 @@ instance Namespace Empty where
type Entry Empty = Empty
data Snapshot Empty = EmptySnapshot
takeSnapshot = return EmptySnapshot
compareSnapshots _ _ EmptySnapshot EmptySnapshot = []
lintSnapshots _ _ = []


liftRule :: (nsub :< nsup) => Rule' ntop nsub -> Rule' ntop nsup
Expand Down

0 comments on commit d86ba65

Please sign in to comment.