
29 Apr
2013
29 Apr
'13
9:44 a.m.
On Mon, Apr 29, 2013 at 11:28:03AM +0100, Ian Knopke wrote:
I've been including newtype Foo in a Common.hs module that is included in both, as I would in C or C++. This sort of thing can easily get more complicated as the program grows however.
That is exactly what I would do, and is a common practice. For example, you will often see a module named something like 'Foo.Bar.Types' which contains declarations of common types which are used in many other modules. I am not sure what you mean when you say that this can get complicated as the program grows. I have some fairly large packages using this technique and in practice I have not seen much complication. Can you give an example of the sort of complication you mean? -Brent