(temp-commit) use new type ast in writeMap