<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<blockquote
cite="mid:CAAJHNPCSUdpCP1caTxdJZL+DQqGcN_2kZ9cYQvUG7apNgxnGeQ@mail.gmail.com"
type="cite">
<div dir="ltr">I suppose the real question is, as a language
standard and a community preference, should this be considered a
bug? Should people be free to use X.Y.hs or X/Y.hs styles?<br>
</div>
</blockquote>
<br>
First off all, the support you mention seems to be incomplete, or
very recent. At least my ghci 7.10 failed to import a module with a
dot-name. But maybe my quick-and-dirty test was broken…<br>
<br>
I'll also add a fun variation to the discussion. Let's say I have
two modules named <tt>Bar.Foo</tt>, and <tt>Bar.Baz</tt> and
submodules <tt>Bar.Foo.Internals</tt> and <tt>Bar.Baz.Internals</tt>.
(eg. for testing purposes) It always bugged me that the usual
approach would be this:<br>
<br>
<tt>╶┮▬ Bar/<br>
</tt><tt><tt> ├─┮▬ Baz/<br>
│ ╰─╴ Internals.hs</tt><tt><br>
</tt>├─┮▬ Foo/<br>
│ ╰─╴ Internals.hs</tt><tt><br>
</tt><tt><tt> </tt></tt><tt><tt><tt>├</tt></tt></tt><tt><tt><tt><tt><tt>─</tt></tt></tt>─╴
Baz.hs</tt><tt><br>
</tt>╰──╴ Foo.hs<br>
</tt>
<p>My gripe is that here related modules are in completely unrelated
positions. One way to solve it with dot-names would be
</p>
<pre><tt>╶┮▬ Bar/</tt><tt><tt>
</tt></tt><tt><tt><tt><tt> ├</tt></tt></tt></tt><tt><tt><tt><tt>─</tt></tt>─╴ Baz.hs</tt>
</tt><tt><tt> ├──╴ </tt><tt><tt>Baz.</tt>Internals.hs</tt></tt><tt><tt>
├──╴ </tt><tt><tt>Foo.</tt>hs</tt></tt><tt>
</tt><tt> ╰──╴ Foo.</tt><tt><tt><tt>Internals.</tt></tt>hs</tt></pre>
<p>But that can lead to a lot of clutter fast. So here's a variation
which goes to the other extreme. It is completely unsupported
right now though:</p>
<p><tt>╶┮▬ Bar/<br>
</tt><tt><tt> ├─┮▬ Baz/</tt></tt><br>
<tt><tt><tt><tt> │ </tt></tt></tt></tt><tt><tt><tt><tt><tt><tt>├</tt></tt>─╴
Internals.hs</tt><tt><br>
</tt></tt> │ ╰─╴ hs</tt><tt><br>
</tt></tt><tt><tt><tt>╰</tt></tt>─┮▬ Foo/</tt><br>
<tt><tt><tt><tt><tt> </tt></tt></tt></tt><tt><tt><tt><tt><tt><tt>├</tt></tt>─╴
Internals.hs</tt><tt><br>
</tt></tt></tt></tt> ╰─╴ hs</tt><tt><br>
</tt></p>
<p>That <tt>hs</tt> name does look a bit ridiculous, but the idea
is to have something like an <tt>index.html</tt> without
reserving a name. If slashes and dots were 100% interchangeable,
this would be the logical extension. Now related files are in
related positions. Downside: The <tt>hs</tt> files don't have a
file extension. (There could be a special case to use <tt>.hs</tt>
as a special name instead, but that would lead to hidden files and
break consistency…)<br>
</p>
<p>I realize this version probably won't gain much approval, but
between this and throwing everything and the kitchen sink on the
top level just because some tools don't offer opened-up nested
hierarchical views into directory structures – I would choose this
one, personally. Or maybe a mixture, depending on actual
structure. But then both options are better than the one with
unrelated positions, and the dot-name approach might at least be
one that works right now.</p>
<p><br>
</p>
<p>Cheers,<br>
MarLinn<br>
</p>
</body>
</html>