> kh> In that case, perhaps you should always use data declarations (with a
> kh> dummy constructor) rather than type synonyms. Some compilers will give
> kh> you better error messages this way, and a good compiler might eliminate
> kh> the extra constructor anyway (depending on how good a strictness
> kh> analyser it has!).
>
> Are there any "good" compilers available? i.e. will any of the
> currently available compilers do the above optimisation?
I wouldn't count on any strictness analyser to spot that. And as far
as I know there are no compilers even trying to do it.
A way to get it to work is to have strict constructors, in this
way the user can declare where the constructor should be elided
and it will be reliable. This feature is available in HBC.
-- Lennart