Fix corner case in typeKind, plus refactoring
This is a continuation of commit 9d600ea6 Author: Simon Peyton Jones <firstname.lastname@example.org> Date: Fri Jun 1 16:36:57 2018 +0100 Expand type synonyms when Linting a forall That patch pointed out that there was a lurking hole in typeKind, where it could return an ill-scoped kind, because of not expanding type synonyms enough. This patch fixes it, quite nicely * Use occCheckExpand to expand those synonyms (it was always designed for that exact purpose), and call it from Type.typeKind CoreUtils.coreAltType CoreLint.lintTYpe * Consequently, move occCheckExpand from TcUnify.hs to Type.hs, and generalise it to take a list of type variables. I also tidied up lintType a bit.
Showing with 192 additions and 189 deletions