[Git][ghc/ghc][wip/int-index/enforce-namespaces] use NonEmpty, add comments, test cases