## arithmetic/src/basictypes/fraction/fraction.tmpl

%
% Quake functions to instantiate operations on generic fraction numbers.
%
readonly proc Fraction (nm, impl, rfield, gcd) is
local base = nm & "Fraction"
build_generic_intf (base, "Fraction"&impl, [rfield], VISIBLE)
build_generic_impl (base, "Fraction"&impl, [rfield, gcd])
end
readonly proc FractionFmtLex (nm, rfield) is
local basic = nm & "FractionFmtLex"
local rfmt = nm & "FmtLex"
local ffield = nm & "Fraction"
build_generic_intf (basic, "FractionFmtLex", [rfmt, ffield], VISIBLE)
build_generic_impl (basic, "FractionFmtLex", [rfmt])
end