[Haskell-cafe] Types in bounds

2008-09-01 Thread Brettschneider, Matthias
Hey there, i was just thinking about types in Haskell and I asked myself, Is there a mechanism, that allows me to define a new type out of an existing one with some restrictions? So that the new type is a subset of the existing one. Lets imagine I want a type for a point like: type Point =

Re: [Haskell-cafe] Time for a new logo?

2008-12-15 Thread Brettschneider, Matthias
If there is someone interested in playing around with the logo Don posted, I made a gimp-version out of it. http://frosch03.de/haskell/Haskell.xcf http://frosch03.de/haskell/Haskell.png -- Matthias ___ Haskell-Cafe mailing list

[Haskell-cafe] Are there performant mutable Arrays in Haskell?

2009-03-19 Thread Brettschneider, Matthias
Hey There, I am trying to write a hash-algorithm that in fact is working, but as you might have guessed the problem is the performance :) At the moment I am 40 times worse than the same implementation in C. My problem is, I need mutable arrays which are the heart of that hash. The algorithm

RE: [Haskell-cafe] Are there performant mutable Arrays in Haskell?

2009-03-24 Thread Brettschneider, Matthias
Thx for your hints, I played around with them and the performance gets slightly better. But the major boost is still missing :) I noticed, that one real bottleneck seems to be the conversion of the array back into a list. The interesting part is, if I use the elems function (Data.Array.Base)

RE: [Haskell-cafe] Are there performant mutable Arrays in Haskell?

2009-03-25 Thread Brettschneider, Matthias
To make a long story short, here is the library code: elems arr = case bounds arr of (_l, _u) - [unsafeAt arr i | i - [0 .. numElements arr - 1] And my version: boundedElems arr = case bounds arr of (_l, _u) - [unsafeAt arr i | i - [1737 .. 1752]] Is there a reason,