[Haskell-cafe] Re: [Haskell] My summer of code project: HsJudy

Simon Marlow simonmarhaskell at gmail.com
Thu Jun 1 08:47:42 EDT 2006

Bulat Ziganshin wrote:

> Thursday, June 1, 2006, 2:13:03 PM, you wrote:

>>Bulat Ziganshin wrote:
>>>1. In terms of Haskell, Judy is a library of _mutable_ collections of
>>>_unboxed_ elements. i pointed you to the Array wiki page, where
>>>differences between boxed and unboxed, mutable and immutable
>>>datastructures are described
>>There's no reason you can't use Judy to implement immutable collections,
>>just as we use mutable arrays to implement immutable ones.
> if you mean Data.Array.Base module (not Data.Array.Diff), then mutable
> arrays used there only to _initialize_ immutable ones

Yes of course.  I'm objecting to your comment above, which implies that 
because Judy implements mutable collections, that is how they must be 
presented to the Haskell programmer.  That simply isn't the case, you 
can certainly use Judy as the substrate for an immutable collection type 
in Haskell.  Augmenting the collection might be inefficient, but that 
depends on how you implement it, just like arrays.  It would be 
appropriate in cases where you initialize a collection once, and then 
access it many times.


More information about the Haskell-Cafe mailing list