[Haskell-cafe] Sparse records/ADTs

Sjoerd Visscher sjoerd at w3future.com
Sat Oct 27 12:19:56 CEST 2012

Maybe the vault package works for you?

Sjoerd Visscher

On Oct 26, 2012, at 5:17 PM, Jon Fairbairn <jon.fairbairn at cl.cam.ac.uk> wrote:

> Twan van Laarhoven <twanvl at gmail.com> writes:
>> On 24/10/12 12:08, Jon Fairbairn wrote:
>>> Is there a convenient way of handling a data structure with lots
>>> of fields of different types that may or may not be filled in?
>> Not sure about convenience, but here is a type safe solution
>> with O(log n) lookups and updates. The idea is to define a
>> GADT tree type with a fixed layout:
> Thanks for your reply (and for all the others). Since type safe
> is something that (for me) goes without saying, this is the best
> solution, but it doesn’t really satisfy the convenience aspect.
> (I had already looked at solutions using Map and contemplated a
> tree structure, but didn’t like anything I had come up with). In
> short, it looks like the answer to my question is “No.” :-/
> -- 
> Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list