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
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
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
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
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
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
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
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
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
#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
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
11 matches
Mail list logo