On Sat, Mar 8, 2008 at 9:23 PM, Brandon S. Allbery KF8NH
I think you might be able to do this as a typeclass instead, at the
expense of having to insert an instance declaration for each type.
(You will have to use an extension if you want to declare instances
for types such as Int. I
I have some code for creating instances of Enum for a tuple of bounded
enumerable types.
The main win with this was that it makes it easier for me to generate
Test.QuickCheck.Arbitrary instances for types that are based on
collections of enumerable collections -- like you might get when
modeling
On Mar 8, 2008, at 22:06 , Thomas Hartman wrote:
A minor issue: I had a question if I could make the type signatures
for Enum instances less verbose by doing something like type
BoundedEnum = (Bounded a, Enum a) = a... I tried, and commented out
my attempt as it wouldn't type check. Guidance
On Sun, Mar 9, 2008 at 3:23 AM, Brandon S. Allbery KF8NH
[EMAIL PROTECTED] wrote:
myFunc :: (forall a. (Bounded a, Enum a) = a) -
(forall a. (Bounded a, Enum a) = a) -
(forall a. (Bounded a, Enum a) = a)
which is a rather useless declaration (I think the only