[Haskell-cafe] Re: FASTER primes

Daniel Fischer daniel.is.fischer at web.de
Tue Jan 5 05:31:13 EST 2010

Am Dienstag 05 Januar 2010 10:33:19 schrieb Will Ness:
> Such a
> system would probably have to distinguish, at the type level, between
> [1..m] ; cycle [1..m] ; take n [1..m] ; etc. These would all be not just
> fuctions, but parts of a type's (here list) behaviour with automatically
> deduced semantics.
> What would such a type system be called?

Seriously complicated, I think.
Don't get me wrong, a system with such capabilities would be A.W.E.S.O.M.E.
I just can't see it happening anytime soon.

> I would imagine so. Do I get this fusion on lists for free from the
> compiler, or do I have to recode for that? (haven't yet time to look into
> the article mentioned).
Without optimisations, hardly ever if at all (needs a compiler expert to know).
With optimisations, sometimes. But it doesn't always see the possibility where it would 
with recoding in the right style (dons is expert in that).
With stream fusion, more often. But I think it would again be not very hard to hide 
opportunities for fusion by your coding style.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100105/44a1c385/attachment.html

More information about the Haskell-Cafe mailing list