ShapeOfMatter / MultiChor

Type-safe and efficient choreographies for Haskell, with multiply-located values, multi-cast, and location-set polymorphism.
Other
8 stars 0 forks source link

Add faceted, fanout, and fanin #6

Closed ShapeOfMatter closed 4 months ago

ShapeOfMatter commented 4 months ago

I think the signatures for fanOut and fanIn themselves are probably:

fanOut :: Subset qs ps -> (forall q. Member q qs -> Choreo ps m (Located '[q] a)) -> Choreo ps m (Faceted qs a)

fanIn :: Subset qs ps -> Subset rs ps -> (forall q. Member q qs -> Choreo ps m (Located rs a)) -> Choreo ps m (Located rs [a])

But is that the right set of fundamental building blocks? And how does the existence of Faceted affect the rest of the API?