Re: GL.BufferObjects patch request (1-liner)

Neal Alexander <[email protected]> Tue, 28 Apr 2009 23:42:55 +0200
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Sven Panne wrote:
> I am not 100% convinced that there is no way around this using 
> withMappedBuffer (e.g. by passing the pointer from the wrapped action to 
> another thread)

The ptr gets globally unmapped by withMappedBuffer though.

> Although I'm really striving for API minimality, anticipating all possible uses of an API is really hard. Having 2 
> ways of achieving things is not nice, but it is probably the safest thing to 
> do here. *sigh*
> 

Yea.

Maybe you could do like the ByteString library and export things like 
this from an "internals" module. 
http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString-Internal.html

Or just separate the package into a direct C-API translation (with some 
haskell style error handling), then build a higher level haskell API 
ontop of it (withXXXX functions, added type safety, etc) - maybe even as 
a seperate hackage library.