> On Thu, 22 Jul 2010, Chad Scherrer wrote:
> > I thought it might help to put it into a module and do a better job
> > with the type, like this:
> >
> > bdRangeSize :: (Ix i, Bounded i) => i -> Int
> > bdRangeSize _ = rangeSize (minBound, maxBound :: i)
> 

Henning Thielemann <lemming <at> henning-thielemann.de> writes:
> bdRangeSize x = rangeSize (minBound, maxBound `asTypeOf` x)

Perfect, thank you!

Chad

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to