Request: Open Module Resolution

S. Alexander Jacobson alex at alexjacobson.com
Tue May 3 18:01:02 EDT 2005


Problem:

Haskell has both no standard way to resolve module names to 
implementations and no easy way to experiment with different 
solutions.  For example, I would like to experiment with a resolver 
that uses a lookup table to map module names to URLs of module 
implementations.

Proposal:

1. Define a standard resolver module

   module Resolve where

   type Resolver = Args -> ModuleName -> IO HaskellSource
   resolve::Resolver

2. Require that Haskell compilers allow users to supply resolvers
e.g.

   ghci -r ../../Resolve.hs


-Alex-

PS This request is the output of discussion I was having with Dimitry 
Golubovsky (and others).


______________________________________________________________
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com




On Fri, 29 Apr 2005, Dimitry Golubovsky wrote:

> Alex,
> 
> Quoting your message in Libraries:
> 
> =================
> 
> We should think of module names as being like domain names, and module
> implementations as being like IP addresses.  Just as the owner of a
> domain name determines valid IP addresses for it, the owner of a
> module name should be able to determine valid implemementations.
> Just as you can't provide domain name resolution for domain names you
> don't own, you should not be able to provide module name resolution
> for module names you don't own.
> 
> We need a Module Name System analogous to the Domain Name System.
> Haskell compilers should be able to query a root server to find which
> MNS server is authoritative for a particular module name.  A query to
> that MNS server should result in URLs for implementations of that
> module.
> 
> ===============
> 
> Some time ago I wrote up on Haskell-cafe:
> 
> http://www.haskell.org//pipermail/haskell-cafe/2005-March/009515.html
> 
> about proposed mechanism of module name resolution. What do you think?
> This can be done flexible enough with minimal changes to the compiler
> (just make it open a pipe instead of a file) and letting an external
> program do the business.
> 
> Nobody answered though.
> 
> I am writing off-list, but if you find my ideas useful feel free to
> move the discussion to Libraries or Cafe.
> 
> -- 
> Dimitry Golubovsky
> 
> Anywhere on the Web
>



More information about the Libraries mailing list