
Simon Peyton-Jones
writes: No! no! no! For records _don't_ put records in nested/sub-modules, and
_don't_ require them in separate modules (as currently). Here's how ...
I've put up my proposal for namespacein Records/fields in Haskell, as an extra page linked from the Wiki. http://hackage.haskell.org/trac/ghc/wiki/Records Apologies for the rough-as-guts editting. AntC
[There may be other reasons for nested/sub-modules, but records ain't it.]
The reason was hinted at way back in Chris Done's attachment to the original Records wiki http://hackage.haskell.org/trac/ghc/wiki/Records "types in a non- trivial project".
Let's say I have a database application with a field (meaning type) customer_id. Then it appears in records for name and address, pricing, order entry, etc. This is not a name 'clash', it's 'intended sharing'. (It really galls me to even put it that way for explanatory purposes. Really it's the **same** customer_id.)