[Haskell-cafe] Vague: Assembly line process

Steve Schafer steve at fenestra.com
Tue Jun 15 13:43:26 EDT 2010

On Tue, 15 Jun 2010 19:23:35 +0200, you wrote:

>When I know my supplies I want to know what I can produce. When I know what I 
>want to produce I want to know what supplies I need for that. Both kinds of 
>questions should be answered by a singe Process thingy.
>I want to be able to chain processes and the whole thing should still act like 
>a Process.

This is a type of constraint network. If you have access to _Structure
and Interpretation of Computer Programs_, there is a section therein
devoted to constraint networks. See also:


Note that you need to be able to handle two kinds of "chaining":

 compoundContraint = constraint1 AND constraint2
   -- the compound constraint isn't satisfied unless you can satisfy
   -- both primary constraints

 compoundContraint = constraint1 OR constraint2
   -- the compound constraint is satisfied if either of the primary
   -- constraints is satisfied

More information about the Haskell-Cafe mailing list