Created
March 31, 2011 13:34
-
-
Save paolino/896349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | Pure item Selector | |
type Mask a = a -> Bool | |
-- | Build record, containing an action to build an item, and the dependencies. | |
-- | |
-- The return value of the action computed in its monad is a set of created resources, | |
-- along with their compiler. | |
-- | |
-- This derived resources depends on the up to date state of the builded one for their existence. | |
-- | |
-- This is a different dependency from a uptodate to uptodate dependency. | |
-- | |
-- The u2udeps are the normal uptodate to uptodate dependency, for the compiler. They functionally don't | |
-- on the item actually compiled. | |
-- | |
data Build m a = Build { | |
buildAction :: a -> m [(a,Build m a)], | |
u2udeps :: Mask a | |
} | |
-- | Base set of builds, selectable by mask. | |
-- | |
-- Notice how this is different from the structure returned from a Build action. | |
-- Here the actions are valid for a subspace of the items. | |
-- | |
-- Any item matched by the 'Mask' must be compiled with the associated 'Build' value. | |
-- | |
type Builder m a = [(Mask a, Build m a)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment