[Haskell-cafe] Re: Combinators for Bi-Directional Tree Transformations: A Linguistic Approach to the View Update Problem in Haskell

2007-07-06 Thread Benjamin Pierce

Hi Titto,

I'm not aware of any Haskell implementations of these bi-directional  
combinators, but the core definitions are not very big -- someone  
looking at the ML code should have no trouble recreating them in  
Haskell.  The main issue to take care of, beyond the mathematical  
description in the paper, is doing enough memoization of intermediate  
structures.


(Implementing a full-blown programming language based on these  
combinators is a more serious project, but even there the amount of  
code is not that large -- it's the design that takes time, and that  
you can just steal. :-)


Regards,

- Benjamin

P.S.  Please cc me directly on any responses -- I don't read the  
HaskellCafe list regularly...



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


[Haskell-cafe] Re: Combinators for Bi-Directional Tree Transformations: A Linguistic Approach to the View Update Problem in Haskell

2007-07-06 Thread Pasqualino 'Titto' Assini
Hello Benjamin, many thanks for you answer.

On Friday 06 July 2007 20:43:03 Benjamin Pierce wrote:
 Hi Titto,

 I'm not aware of any Haskell implementations of these bi-directional
 combinators, but the core definitions are not very big -- someone
 looking at the ML code should have no trouble recreating them in
 Haskell.  The main issue to take care of, beyond the mathematical
 description in the paper, is doing enough memoization of intermediate
 structures.

I am working on a Web application with an Ajax front-end  and I am shopping 
around for a suitable query language.

Updatable views sounds like a good choice, that might be used both for access 
control and external query/updates.

If I understand correctly the mechanism (I just found out about harmony 
today), queries could be implemented as the get of a composition of an 
access_control _read  lens plus the end user query and updates would be 
the putback of the composition of an access_control_write lens with the end 
user query.

I wonder however how hard would it be to get it to work efficiently on what 
might be quite extensive data structure and how hard it would be to map 
arbitrary Haskell data structure to the tree structures on which the 
combinators are defined (or alternatively, if it would be possible at all to 
define similar combinators direcly on haskell data types).

 (Implementing a full-blown programming language based on these
 combinators is a more serious project, but even there the amount of
 code is not that large -- it's the design that takes time, and that
 you can just steal. :-)

Just a curiosity: why bothering to define a new language? 

What is the advantage with respect to simply providing the combinators as an 
O'Caml library?

 Regards,

  - Benjamin

Regards,

   titto



 P.S.  Please cc me directly on any responses -- I don't read the
 HaskellCafe list regularly...


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