Relax the restriction on Bounded derivation
Isaac Dupree
isaacdupree at charter.net
Wed Apr 18 08:29:25 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Isaac Dupree wrote:
> However there is a good argument for having some sort of bounded-enum
> class for things that have a finite number of discrete positions. These
> have log(number of possibilities) information content and can (in
> theory) be serialized with such a number of bits known from the type.
> Designing such a class could be interesting...
In particular, this hypothetical class could be derived more generally
than Enum:
data Blah a b = Baz Int a Bool | Quux | Quuuux b
derived instance (Finite a, Finite b) => Finite (Blah a b)
since Int and Bool are in this class.
Isaac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGJg8lHgcxvIWYTTURAln7AJ49TOSqXbx4GNzYti0GVuYBDPjDXQCfcDQz
BPbBk1M9cZRS24Dt6b+0inQ=
=X+1X
-----END PGP SIGNATURE-----
More information about the Haskell-prime
mailing list