
15 Jun
2010
15 Jun
'10
3:26 p.m.
On Tue, Jun 15, 2010 at 7:23 PM, Martin Drautzburg
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.
Your Process thingy reminds me of a natural isomorphism: data Iso a b = Iso { ab :: a -> b , ba :: b -> a }
I want to be able to chain processes and the whole thing should still act like a Process.
These isomorphisms can be chained together using the standard Category method '.': import qualified Control.Category as C instance C.Category Iso where id = Iso id id Iso bc cb . Iso ab ba = Iso (bc . ab) (ba . cb)