There were several letters on the subject of constructing Ratio
values with  n % m,
             n :% m   (impossible).

Haskell-98  provides the function (or operation)  %  
that models the rule for the symbol `/' for Rational numbers in 
mathematics.
Similar as     ` 4/(-6) = 2/(-3) = (-2)/3 '
is true in mathematics
              ( 4%(-6) == 2%(-3),  2%(-3) == (-2)%3 )  =  (True,True)
in Haskell-98.
And the *constructor* `:%' does not exist at all in Haskell-98.
Haskell-98 puts that there is no need for it and chooses this 
approach for evident reason.

Other approach is also possible.
For example, my DoCon program defines  data Fraction a = a :/ a ...
and exports `:/'.
It helps efficiency, but requires more care from the programmer to
avoid certain evident danger.

------------------
Sergey Mechveliani
[EMAIL PROTECTED]





Reply via email to