[Haskell-cafe] A Monad for on-demand file generation?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Tue Jul 1 17:59:55 EDT 2008


On 2008 Jul 1, at 17:52, Ryan Ingram wrote:

> Well, you're also (from your description) probably writing some
> tracking information to an IORef of some sort.  That can happen in the
> middle of an otherwise pure computation, and it's difficult to know
> exactly when it'll get triggered, due to laziness.  You can probably
> make it work :)
>
>>> If you have the ability to store metadata about the computation  
>>> along
>>> with the computation results, maybe that would be a better solution?
>>
>> Not sure what you mean here, sorry. Can you elaborate?
>
> Well, while doing the computation the first time, you can track what
> depends on what.  Then you save *that* information out.  Here's an

This sounds suspiciously like Writer to me.

-- 
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




More information about the Haskell-Cafe mailing list