There was a series of essays about esoteric language features posted here a few weeks ago, and one of them was exactly what you're talking about. It was a functional language, with the ability to mark functions as involving I/O, non-terminating, or (I think) arbitrary custom "colors."
It was an academic language, but very interesting. Sadly, I don't remember the name. Maybe somebody else can post the link.