Using WriterT to implement AstElem.