From: Marc W. <mar...@gm...> - 2006-07-28 21:26:36
|
I've tried understanding what the BoundedList.hs module is all about but I couldn' get it completely -- This inductive approach gives the complexity O(n) on the number of instances -- and very short type checking times compared to an O(n\^2) implementation. Where is the difference between [a] and (BoundedList a Nxx)? Is it only used for BoundedString by now? (to prevent data loss when copying from char(10) to char(4)? Did I get it right that the internal representation is still an ordinary list ? (newtype BoundedList a n = BoundedList [a])? Looking at instance (Show a, Size n) => Show (BoundedList a n) where show l@(L xs) = show xs l@ is superfluous, isn't it? Marc |