Does anybody have any code out there in a project somewhere that uses IOChannel?

Specifically, i'm looking for an example where you read stdin and attach a function to watch it (where the watching takes place subsequent to Main.run). The attaching call would presumably be through ioAddWatch, but i'm not so clear on all the details of the arguments. I would be grateful to see an example in a working piece of code.

So, thanks in advance if this is possible and you have a piece of code you'd like to point to.

dan