2 points on language
Fri, 24 Aug 2001 12:35:38 +0400
> Anyway, if a compiler `knows' the word CommutativeRing,
> expr = (2*a + b) - (a+a) :: T
> and sees the language version (compiler) flag -fignore-bottom,
> (something of this sort) then, has it right to convert
> expr --> b :: T
D. Tweed <email@example.com> writes
> On a purely pragmatic note ( :-) ) these optimisations can't necessarily
> be safely used in three of the four most common cases, namely Int, Float
> and Double because of the restricted range of intermediates.
Int, Float, Double
are not supposed to be provided with the CommutativeRing instance.
And most common cases are, to my mind, different:
Integer, Rational, (Integer, Rational), Polynomial Integer ...