Who could advise, please, what to do with the records like
data SomeConstr a =
SomeConstr {up_SomeConstr :: a, low_SomeConstr :: a}
How to avoid this ugly postfix _SomeConstr ?
I want the lables to be `up', `low'.
But a large program is likely to have other data structures with
the same label names. For many objects may have naturally some sort
of "up" and "low". And this almost forces the programmer to introduce
for the lables prefixes/postfixes that repeat the name of the data
constructor.
Maybe, we need overloading of record lables for Haskell-2 ?
Occasionally, the extended record system of Hugs, does it provide
anything in this way?
In what situation the "overloded" `up x' may be ambiguous?
Say,
f :: C b => b -> b
f x = up x,
and let SomeConstr a, OtherConstr a be the instances of C
and records of different types having common label name 'up'
...
In such case, the compiler may report the ambiguity, and the
programmer may add the qualifier.
But in many other situtations, `up x' would be resolved.
Thank you in advance for your responses.
------------------
Sergey Mechveliani
[EMAIL PROTECTED]