[Haskell-beginners] How to access non-exported function from Data.Set?

Ozgur Akgun ozgurakgun at gmail.com
Thu Jun 2 12:03:52 CEST 2011

You are right, the constructors are not exported so you cannot actually
inline splitLookup.

On 2 June 2011 02:06, Christoph Bussler <chbussler at aol.com> wrote:

> In terms of the use case, I’d like to find an element in a set. If the
> element is there, I’d like to get it back (not just the fact that it
> exists). If it is not in the set, I’d like to get the next higher and the
> next lower one (according to the sort order). This is almost exactly what
> splitLookup does, however, splitLookup gives me both the trees, whereas I
> only would need the elements of the set.

But for this use case, you can use splitMember just as well?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110602/ae6fad59/attachment.htm>

More information about the Beginners mailing list