Implement `with` directive.

Closes #146.