[Ur] common type for different functor instantiations

Gergely Buday gbuday at gmail.com
Wed Nov 2 08:00:57 EDT 2011


Thinking a bit about the original problem, I came to a change of aspect.

I need not and must not export the underlying record. Better I should
define the following:

functor Render(sig con mRecord :: {Type}  end) : sig renderToXml :
data -> transaction xbody end

Upon first call the renderToXml function should compute the underlying
record, store it in a source cell and render normally. Upon later
calls it should compute the record, compare to the previous one in the
source cell, render so that differences are highlighted and store the
record in the source cell. My mistaken idea was that if I want to do
this in the client - i.e. the browser - then I should do it outside of
the functor, but this is not the case. The idea was mistaken also from
the abstraction point of view: the client - which is here not the web
client, but the functor caller - need not know the internals of the
computation, just the generated xml.

Sorry for bothering the list with this.

- Gergely



More information about the Ur mailing list