record lables overloading

1999-11-15 Thread S.D.Mechveliani
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 wi

record lables overloading

1999-11-15 Thread Tom Pledger
S.D.Mechveliani writes: | [...] | But a large program is likely to have other data structures with | the same label names. [...] | | [...] | 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

Re: record lables overloading

1999-11-16 Thread Sven Panne
Tom Pledger wrote: > How about using qualified imports of modules? > [...] > module Test where > import qualified QL1 > import QL2 > [...] You don't even have to use a qualified import for QL1, prefixing the ambiguous occurrences of up/low is enough (think of a large module QL1 where most n

Re: record lables overloading

1999-11-17 Thread Sven Panne
Sven Panne wrote: > Tom Pledger wrote: > > How about using qualified imports of modules? > > [...] > > module Test where > > import qualified QL1 > > import QL2 > > [...] > > You don't even have to use a qualified import for QL1, prefixing > the ambiguous occurrences of up/low is enough [..