<div class="gmail_quote">On Wed, Nov 18, 2009 at 3:10 PM, levi <span dir="ltr">&lt;<a href="mailto:greenspan.levi@googlemail.com">greenspan.levi@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Nov 18, 8:18 pm, Luke Palmer &lt;<a href="mailto:lrpal...@gmail.com">lrpal...@gmail.com</a>&gt; wrote:<br>
&gt; You know, another solution to the records problem, which is not quite<br>
&gt; as convenient but much simpler (and has other applications) is to<br>
&gt; allow local modules.<br>
&gt;<br>
&gt; module Foo where<br>
&gt;   module Bar where<br>
&gt;     data Bar = Bar { x :: Int, y :: Int }<br>
&gt;   module Baz where<br>
&gt;     data Baz = Baz { x :: Int, y :: Int }<br>
&gt;<br>
&gt;   f a b = Bar.x a + Baz.y b<br>
<br>
</div>+1<br>
<br>
Independent of TDNR I would welcome this. Maybe Ticket 2551 (&quot;Allow<br>
multiple modules per source file&quot;) [1] should be reconsidered.<br></blockquote><div><br>Although ticket 2551 is not exactly what Luke is suggesting (which would be an extension to the language, whereas, if I&#39;m not mistaken, 2551 is just a change to where GHC can find modules, not nesting of modules). <br>
</div></div><br>