[Haskell] URLs in haskell module namespace
GK at ninebynine.org
Tue Mar 22 06:49:42 EST 2005
At 15:47 21/03/05 -0500, S. Alexander Jacobson wrote:
>As I move from machine to machine, it would be nice not to have to install
>all the libraries I use over and over again. I'd like to be able to do
>something like this:
> import http://module.org/someLib as someLib
>If the requested module itself does local imports, the implementation
>would first try to resolve the names on the client machine and otherwise
>make requests along remote relative paths.
I think this is an interesting idea, that has some interesting implications
for possible evolution of Haskell as an integrated "scripting language" for
the web. One of the principles of web architecture is, roughly, that
anything worth naming is worth naming with a URI .
I think a logical consequence of using URIs for module names is that module
exports can become URI references with fragment identifiers. Thus, given:
module http://example.org/modules/foo( func1, func2, val3 ) where ...
Also introduces URI references:
This exactly where web services and SOAP are going, using URIs to identify
processing services in the Web.
Some other points to note...
Concerning dependency on http: http: is just one URI scheme among
many. It just happens to be very widely used, and provides a uniform
naming and resource location framework  .
Within the Web technical community, there is a strong sense that *all* URIs
should be stable  , or breakage occurs. This is illustrated by the
concern for dependence on changeable URIs expressed in another message in
this thread, but I think that when persistence is needed (for technical
reasons) then it can be arranged.
(I spent a little while looking for a more definitive view on this idea of
the less-than-absolute distinction between identification and location in
the web. Although this topic is much-discussed in web circles, this was
the best I could find quickly.)
More information about the Haskell