
13 Aug
2012
13 Aug
'12
5:13 p.m.
On Sun, 29 Jul 2012, Thomas Schilling wrote:
On 29 July 2012 15:37, Thomas DuBuisson
wrote: That is a great point. Most my uses of 'bitSize' are monomorphic and Maybe would just be silly. OTOH, I'd be more than happy to fix up any polymorphic code to include a new BitSize constraint.
To make sure I understand this correctly:
The current problem is that bitSize is a partial function *depending on the type* of its argument (currently it always returns _|_ for Integer, and is total for any other type). That does indeed seem like a Bad Idea.
You propose to:
1. Remove "bitSize" from the Bits class. 2. Add a new class BitSize which only contains the "bitSize" method. Integer would not be an instance of this class.
+1