[Haskell-cafe] Sparse records/ADTs
Yuri de Wit
ydewit at gmail.com
Fri Oct 26 17:25:34 CEST 2012
Would this be relevant?
On Fri, Oct 26, 2012 at 11:17 AM, 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe