[Haskell-cafe] Re: Specify array or list size?
Max Vasin
max-appolo at mail.ru
Sat May 7 10:18:23 EDT 2005
Daniel Carrera <dcarrera at digitaldistribution.com> writes:
> Hello,
>
> Right now I'm using type declarations like:
>
> f :: Int -> [Int]
>
> So f returns a list of Ints.
>
> Is there a way to tell Haskell that a list or array must have exactly
> (say) 256 elements? I'd love to have Haskell make sure that the array
> I build is the correct size.
In short: in type declarations you can't.
But why do you need that? Where do need to make an assumption about the size
of the list?
--
WBR,
Max Vasin.
More information about the Haskell-Cafe
mailing list