Re: [Haskell-cafe] Functional GUI combinators for arbitrary graphs ofcomponents?

2006-12-03 Thread Brian Hulley

Paul Hudak wrote:

Brian Hulley wrote:

Anyway to get to my point, though all this sounds great, I'm
wondering how to construct an arbitrary graph of Fudgets just from a
fixed set of combinators, such that each Fudget (node in the graph)
is only mentioned once in the expression. To simplify the question,


If you consider just Dags, I believe that this question is equivalent
to asking what set of combinators will allow you to create an
arbitrary composition of functions that allow sharing inputs and
returning multiple results.  And I think that one answer to that is
the set of combinators that make up the Arrow class.  If you want to
include recursion (i.e. cycles), then you'd have to throw in
ArrowLoop (although that might only provide a nested form of cycles).
It's in this sense that Fudgets is analogous to Fruit.


Thanks. Actually thinking more about it I've probably missed the point that 
for a compositional GUI there's no need for a general graph, since each 
view/controller of the underlying model could be encapsulated as a single 
widget (eg fudget or signal transformer) which could be connected to the 
model via a loop which exposes only the model (thus allowing other views to 
be added later).


Brian.
--
http://www.metamilk.com 


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Functional GUI combinators for arbitrary graphs ofcomponents?

2006-12-02 Thread Paul Hudak
If you consider just Dags, I believe that this question is equivalent to 
asking what set of combinators will allow you to create an arbitrary 
composition of functions that allow sharing inputs and returning 
multiple results.  And I think that one answer to that is the set of 
combinators that make up the Arrow class.  If you want to include 
recursion (i.e. cycles), then you'd have to throw in ArrowLoop (although 
that might only provide a nested form of cycles).  It's in this sense 
that Fudgets is analogous to Fruit.


   -Paul


Brian Hulley wrote:

Brian Hulley wrote:

Anyway to get to my point, though all this sounds great, I'm
wondering how to construct an arbitrary graph of Fudgets just from a
fixed set of combinators, such that each Fudget (node in the graph)
is only mentioned once in the expression. To simplify the question,
assume we have the following data structure to describe the desired
graph:
   data LinkDesc a
   = Series a a
   | Broadcast a [a]
   | Merge [a] a

   type GraphDesc a = [LinkDesc a]


The above is more complicated than necessary. The problem can be 
captured by:


   type GraphDesc a = [(a,a)]

Brian.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Functional GUI combinators for arbitrary graphs ofcomponents?

2006-12-01 Thread Brian Hulley

Brian Hulley wrote:

Anyway to get to my point, though all this sounds great, I'm
wondering how to construct an arbitrary graph of Fudgets just from a
fixed set of combinators, such that each Fudget (node in the graph)
is only mentioned once in the expression. To simplify the question,
assume we have the following data structure to describe the desired
graph:
   data LinkDesc a
   = Series a a
   | Broadcast a [a]
   | Merge [a] a

   type GraphDesc a = [LinkDesc a]


The above is more complicated than necessary. The problem can be captured 
by:


   type GraphDesc a = [(a,a)]

Brian.
--
http://www.metamilk.com 


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe