[Haskell-cafe] Re: Status of TypeDirectedNameResolution proposal?

Robert Greayer robgreayer at gmail.com
Wed Nov 18 15:49:36 EST 2009


On Wed, Nov 18, 2009 at 3:10 PM, levi <greenspan.levi at googlemail.com> wrote:

> On Nov 18, 8:18 pm, Luke Palmer <lrpal... at gmail.com> wrote:
> > You know, another solution to the records problem, which is not quite
> > as convenient but much simpler (and has other applications) is to
> > allow local modules.
> >
> > module Foo where
> >   module Bar where
> >     data Bar = Bar { x :: Int, y :: Int }
> >   module Baz where
> >     data Baz = Baz { x :: Int, y :: Int }
> >
> >   f a b = Bar.x a + Baz.y b
>
> +1
>
> Independent of TDNR I would welcome this. Maybe Ticket 2551 ("Allow
> multiple modules per source file") [1] should be reconsidered.
>

Although ticket 2551 is not exactly what Luke is suggesting (which would be
an extension to the language, whereas, if I'm not mistaken, 2551 is just a
change to where GHC can find modules, not nesting of modules).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091118/d7cde550/attachment.html


More information about the Haskell-Cafe mailing list