[Haskell-cafe] Can this be done?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Feb 12 01:11:56 EST 2009


On 2009 Feb 12, at 1:04, wren ng thornton wrote:
> It's ugly, but one option is to just reify your continuations as an  
> ADT, where there are constructors for each function and fields for  
> each variable that needs closing over. Serializing that ADT should  
> be simple (unless some of those functions are higher-order in which  
> case you run into the same problem of how to serialize the function  
> arguments). In GHC's STG machine this representation shouldn't have  
> much overhead, though it does require the developer to do the  
> compiler's job.


Hmmm... Template Haskell useful here?  Feed it the continuation,  
extract the AST and rewrite as an ADT?

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090212/25116638/PGP.bin


More information about the Haskell-Cafe mailing list