Re: Fusion vs. inlining (Was: [Haskell-cafe] Fusion of lists and chunky sequences)

2008-01-09 Thread Henning Thielemann
On Tue, 8 Jan 2008, Roman Leshchinskiy wrote: > Henning Thielemann wrote: > > > > Anyway, I tried to wrap Prelude lists in a newtype and thus got GHC (still > > 6.4.1) to invoke my rules instead of the Prelude rules. But I encountered > > the following problem: I define something like > > > > n

Re: Fusion vs. inlining (Was: [Haskell-cafe] Fusion of lists and chunky sequences)

2008-01-07 Thread Roman Leshchinskiy
Henning Thielemann wrote: Anyway, I tried to wrap Prelude lists in a newtype and thus got GHC (still 6.4.1) to invoke my rules instead of the Prelude rules. But I encountered the following problem: I define something like nonFusable x y = fusable (aux x y) where fusion rules are defined for

Fusion vs. inlining (Was: [Haskell-cafe] Fusion of lists and chunky sequences)

2008-01-07 Thread Henning Thielemann
On Thu, 3 Jan 2008, Don Stewart wrote: > You can, with some caveats, use a single fusion system across data > structures, and avoid the built in build/foldr system. > > I'd start by installing the stream-fusion list library, from hackage, > which gives you the list api, and a fusion mechanism. >

Re: [Haskell-cafe] Fusion of lists and chunky sequences

2008-01-03 Thread Don Stewart
lemming: > > On the one hand I like to use lists in my code because element types can > be freely chosen and maximum laziness allows feedback and other tricks. On > the other hand there are ByteString.Lazy and one could build chunky > sequences from other fast array implementations. They have cons

[Haskell-cafe] Fusion of lists and chunky sequences

2007-12-27 Thread Henning Thielemann
On the one hand I like to use lists in my code because element types can be freely chosen and maximum laziness allows feedback and other tricks. On the other hand there are ByteString.Lazy and one could build chunky sequences from other fast array implementations. They have constraints on the elem