Commit 7f2147ad authored by simonpj's avatar simonpj
Browse files

[project @ 1999-08-27 11:48:08 by simonpj]

When deciding if a module is a "library" module, allow
	C:/
	C:\
as prefixes of the path, not just
	/

We need to improve this hack, but this fix makes things
work on Windoze.
parent 253513ac
......@@ -295,10 +295,19 @@ getAllFilesMatching dirs hims (dir_path, suffix) = ( do
)
where
-- Dreadfully crude. We want a better way to distinguish
-- "library-ish" modules.
is_sys | head dir_path == '/' = LibMod
| otherwise = UserMod
is_sys | isLibraryPath dir_path = LibMod
| otherwise = UserMod
-- Dreadfully crude way to tell whether a module is a "library"
-- module or not. The current story is simply that if path is
-- absolute we treat it as a library. Specifically:
-- /usr/lib/ghc/
-- C:/usr/lib/ghc
-- C:\user\lib
isLibraryPath ('/' : _ ) = True
isLibraryPath (_ : ':' : '/' : _) = True
isLibraryPath (_ : ':' : '\\' : _) = True
isLibraryPaty other = False
xiffus = reverse dotted_suffix
dotted_suffix = case suffix of
......
......@@ -632,6 +632,9 @@ multi-directory application, use <em>relative</em> path names in your
Use absolute path names only for directories containing slowly-changing
library modules.
A path is considered ``absolute'' if it starts with ``@/@'', or
``@A:/@'', or ``@A:\@'' (or ``@B:/@'', ``@B:\@'' etc).
Patrick Sansom had a workshop paper about how all this is done (though
the details have changed quite a bit). Ask
him (email: <htmlurl name="sansom@@dcs.gla.ac.uk"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment