[Haskell-cafe] Re: The Proliferation of List-Like Types

Chad Scherrer chad.scherrer at gmail.com
Thu Feb 21 13:23:16 EST 2008


On Wed, Feb 20, 2008 at 7:57 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>  I think there can also be problems simply because the element type is no
>  longer fixed to Word8 but also not entirely free, but restricted to
>  Storable. E.g. you cannot simply replace
>     SV.fromList . List.map f     by      SV.map f . SV.fromList
>   because in the second form not only the result type of 'f' must be
>  Storable, but the input type of 'f' must be Storable, too.

Hmm, interesting. But would we really need this? If we have [a]
rewritten as a stream and SV rewritten as a stream, couldn't they
still fuse?

Loosely speaking,
SV.fromList . List.map f
-> (SV.unstream . List.stream) . (List.unstream . mapS f . List.stream)
-> SV.unstream .  mapS f . List.stream

Chad


More information about the Haskell-Cafe mailing list