610a⟨dom: ACFraction610a⟩≡ (569a) ACFraction(S: IntegralDomain): with { coerce: % -> Fraction S; coerce: Fraction S -> %; ⟨exports of Fraction from LibAldor610b⟩ ⟨exports of Fraction from LibAxiom611d⟩ } == Fraction S add { Rep == Fraction S; import from Rep; coerce(x: %): Fraction S == rep x; coerce(x: Fraction S): % == per x; ⟨implementation of Fraction from LibAldor611a⟩ } Defines: ACFraction, used in chunk54.
mrx⊲23⊳ 11-Feb-2007: The following two are better handled
with macros in include/combinat.as.nw, since otherwise Aldor will not know
which signature to chose in, for example
assert(one? denominator r);
611b⟨NOTYET exports of Fraction from LibAldor611b⟩≡ numerator: % -> S; denominator: % -> S;
611c⟨NOTYET implementation of Fraction from LibAldor611c⟩≡ numerator(x: %): S == numer rep x; denominator(x: %): S == denom rep x;
611d⟨exports of Fraction from LibAxiom611d⟩≡ (610a) canonical @ Category; QuotientFieldCategory(S);