I think having Tab know about Stdlib and Stdlib know about Tab is awkward. I suggest making the caller responsible for passing stdlib and compiler rather than passing a Tab.