[ issue 1269 ] Added type signatures

Also cosmetic changes and changes suggested by HLint 1.9.5.
[ issue 1269 ] Fixed

The function TypeChecking.Primitive.primQNameType returns a normalised
type now.
[ issue 1269 ] Added test case