scope constraint & pretty printing