Extract the list of declarations from each module