
Greetings! I'll try to update the Haskell community periodically on the status of the Haskell' language standard. As mentioned previously, we are currently focusing on two topics, concurrency and the class system. If you feel that you have anything important to contribute to those topics, now is the time to review the proposals, join in the Haskell' mailing list and let us know what you know! Stephanie Weirich has posted a summary of the class system discussion here: http://hackage.haskell.org/trac/haskell-prime/wiki/ClassSystem Stephanie says: This page is important because it lists all of the proposals not related to MPTCs as well as trying to capture the big picture about where we stand with respect to MPTCs. I've been trying to not duplicate text that appears elsewhere in the wiki, but just provide a consistent picture of the state of the discussions on the mailing list. Please take a look at this page and help me fill it out. In particular, 've been trying to take a pulse of where we stand on some of these issues, and some of you may not agree! Tell me if I'm off the wall. Also, I've (mostly) concentrated on issues that have tickets, so I may have missed some issues that were only discussed in the mailing list. Please let me know if there is anything I've forgotten. Simon Marlow has posted a summary of the concurrency discussion here: http://hackage.haskell.org/trac/haskell-prime/wiki/Concurrency Simon says: I have tried to summarise the various points that have arisen during the discussion. If anyone feels they have been mis-paraphrased, or I have forgotten something, please feel free to edit, or send me some text for inclusion. I don't want to include long gobs of text in here, though: just summarise the main points, and if necessary link to relevant mailing list posts. Thanks, Simon & Stephanie for keeping things moving forward! peace, isaac

this is just an idea, that came out from some discussion on #haskell. if one would want to use an external fast library for storing data (using FFI), one would need some sort of marshalling. this is inconvenient as to my knowledge one would have to add new code for each type, correct me if I'm wrong. one solution would be to add (just conceptually) toBinary :: a -> [Int] -- pack data as a string of bytes fromBinary :: [Int] -> a -- unpack binarySize :: a -> Maybe Int -- number of bytes for this type or Nothing if not fixed the packing would be compiler dependent since it is not of interest to read the content, just to get an easy way of marshalling arbitrary types. this might be low priority for now, just giving my input while still remembering it. /Johan Henriksson

On Tue, May 02, 2006 at 12:57:17AM +0200, Johan Henriksson wrote:
toBinary :: a -> [Int] -- pack data as a string of bytes fromBinary :: [Int] -> a -- unpack binarySize :: a -> Maybe Int -- number of bytes for this type or Nothing if not fixed
the packing would be compiler dependent since it is not of interest to read the content, just to get an easy way of marshalling arbitrary types.
Depending on what you mean, we might already have this, or it might be impossible in general :) if you just want to create a reference to an arbitrary haskell type that you can pass to foreign code, and then recover the original haskell value from, then the Foreign.StablePtr does just this. it lets you cast haskell values to plain pointers and back again. if you want to store the structure in memory, then the Storable class provides this. I have thought it would be useful to allow deriving(Storable) with the obvious meaning and adding a 'StorableRef' that can create a reference to an arbitray storable object. I believe bulat is working on unboxed arrays that can work like this. of course, the limitation is that your data types need to be in class Storable. since you don't seem to care about compiler independence and if you are willing to give up architecture independence, you can probably use storable to serialize structures to disk, but do so at your own risk. pretty much any solution will require a typeclass to guide and restrict it, otherwise how would the compiler handle function types? it can't serialize the body of functions in general, or handle cyclic structures or pointers from the serialized version to live haskell structures and how they interect with the GC? You also might want to look at the various Binary libraries out there. perhaps one fits your needs. John -- John Meacham - ⑆repetae.net⑆john⑈
participants (3)
-
Isaac Jones
-
Johan Henriksson
-
John Meacham