On Nov 18, 8:18 pm, Luke Palmer <lrpal...@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.

Cheers,
Levi

---
[1] http://hackage.haskell.org/trac/ghc/ticket/2551
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to