Re: module namespaces with Prelude

2002-04-25 Thread Martin Norbäck
tor 2002-04-25 klockan 01.07 skrev Johan Nordlander: One might also argue that the problem is these extra roots that are implicitly added to the search path. Arguably, dropping the current directory and the directory of the importing module from the search path would solve the problems

Re: module namespaces with Prelude

2002-04-25 Thread Johan Nordlander
On Thursday, April 25, 2002, at 09:20 , Martin Norbäck wrote: tor 2002-04-25 klockan 01.07 skrev Johan Nordlander: One might also argue that the problem is these extra roots that are implicitly added to the search path. Arguably, dropping the current directory and the directory of the

Re: module namespaces with Prelude

2002-04-25 Thread Johan Nordlander
On Thursday, April 25, 2002, at 03:00 , Alastair Reid wrote: Now, since there's nothing that prevents the directory hierarchies starting at these roots from overlapping, we have a potential for ambiguity when we want to map module names to filenames. This suggests that we might want to

RE: module namespaces with Prelude

2002-04-25 Thread Simon Marlow
All in all, dropping all implicit directories from the search path gets my vote. me too. I wasn't aware that Hugs did this, and GHCi certainly doesn't. It's reasonable to leave . in the default search path, but adding an implicit root for an imported module will certainly lead to trouble

Re: module namespaces with Prelude

2002-04-24 Thread Alastair Reid
Now, since there's nothing that prevents the directory hierarchies starting at these roots from overlapping, we have a potential for ambiguity when we want to map module names to filenames. This suggests that we might want to modify the search algorithm to find all matches and report and

RE: module namespaces with Prelude

2002-04-23 Thread Hal Daume III
case, etc. Otherwise we're all guessing. Simon | -Original Message- | From: Hal Daume III [mailto:[EMAIL PROTECTED]] | Sent: 23 April 2002 03:21 | To: Alastair Reid | Cc: Haskell Mailing List | Subject: Re: module namespaces with Prelude | | | Ah, so the problem

RE: module namespaces with Prelude

2002-04-23 Thread Simon Marlow
It happens in Hugs, too, but somewhat differently. Here's a test case. Go to /foo and do mkdir Bar. In Bar, create IO.hs and make its contents: module Bar.IO where then also in Bar create Foo.hs module Bar.Foo where import IO Then when in directory Bar load ghci

Re: module namespaces with Prelude

2002-04-23 Thread Alastair Reid
case, etc. Otherwise we're all guessing. Simon | -Original Message- | From: Hal Daume III [mailto:[EMAIL PROTECTED]] | Sent: 23 April 2002 03:21 | To: Alastair Reid | Cc: Haskell Mailing List | Subject: Re: module namespaces with Prelude | | | Ah, so the problem was that even

module namespaces with Prelude

2002-04-22 Thread Hal Daume III
I'm developing my package NLP for supporting common NLP functions and have a set of functions/datatypes that are common to almost all of my modules and I wanted to separate them off into an NLP.Prelude file, but this seems not to work. One of my modules imports Prelude (the Haskell one) directly

Re: module namespaces with Prelude

2002-04-22 Thread Alastair Reid
#Hal == Hal Daume [EMAIL PROTECTED] writes: I'm developing my package NLP for supporting common NLP functions and have a set of functions/datatypes that are common to almost all of my modules and I wanted to separate them off into an NLP.Prelude file, but this seems not to work. One of my

Re: module namespaces with Prelude

2002-04-22 Thread Hal Daume III
Ah, so the problem was that even though I had the superdir of NLP in my path, I was actually loading the modules in ghci from the NLP directory. Still, I find this behavior odd, since even if I were in the NLP directory I could not import NLP.Foo simply as Foo, I don't see why I should be