[Haskell-cafe] Re: [Haskell] Top Level <-
john at repetae.net
Mon Aug 25 22:03:26 EDT 2008
On Mon, Aug 25, 2008 at 04:55:05PM +0100, Adrian Hey wrote:
> (Moving to Haskell cafe)
> Edward Kmett wrote:
>> On Sun, Aug 24, 2008 at 7:12 PM, Ashley Yakeley <ashley at semantic.org> wrote:
>>> Is there any interest in implementing a top level "<-" to run monadic code?
>> This is actually implemented in jhc. See the 'top level actions' section of
> Gosh! I was always quite impressed by Johns determination to write a
> Haskell compiler and by his self discipline in resisting the temptation
> to fix everything that was wrong with Haskell and keep to standards :-)
Heh. :) I have not had much time recently to work on jhc. but I hope to
pick it up full steam soon. There have been a lot of strong contributers
in the community as well. (sigh. day job syndrome).
> I implemented my own ACIO monad a while ago (which is of course quite
> useless without top level <- bindings) and it turned out that there
> was quite a lot that could go in here.
Yeah, I based my design on what I thought was the 'community consensus'
on how they should look the last time the discussion came up. (not
counting those that were adamantly opposed to the idea alltogether ;) )
I forgot who came up with the original ACIO idea, but I'd give them
props in the manual if they wish.
> The only problem seemed to be that some things that seemed perfectly
> reasonable to create via ACIO had *IO* finalisers associated with them,
> which didn't feel right to me. But if you think about how finalisers
> get run I'm inclined to think we should insist that they are ACIO too.
Yeah, this sounds like a great idea. there were a whole lot of issues
dealing with finalizers and concurrency, and restricting them in some
way similar to ACIO might be good... however, you want something a
little weaker than ACIO I think. it must satisfy the ACIO conditions,
but _may_ assume its argument (the item being collected) is never
referenced again. hence something like 'free' is okay which wouldn't be
if other references to the object exist. do you think that is 'formal'
enough of a description? seems clear enough if ACIO is well defined which I
think it is.
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell-Cafe