Fix two wrong uses of "data constructor" in error msgs
authorRik Steenkamp <rik@ewps.nl>
Tue, 16 Feb 2016 21:42:08 +0000 (22:42 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 16 Feb 2016 21:42:29 +0000 (22:42 +0100)
commitaf5a0e5004cfb1e041280fd7c16f2c1bfee67961
tree061ab0f2264814c375f5388d7b99623938c074aa
parent693a54ea7ac6bdd229e0a297fc023d25263077b9
Fix two wrong uses of "data constructor" in error msgs

Replace `NoDataKinds :: PromotionErr` by `NoDataKindsTC` and
`NoDataKindsDC` (just like there is `NoTypeInTypeTC` and
`NoTypeInTypeDC`). This allows for a correct error message when a kind
signature contains a type constructor and `-XDataKinds` is not
specified.

Apply a small fix to `TcError.hs` where instead of "data constructor" we
should say "pattern synonym".

Reviewers: austin, goldfire, bgamari

Reviewed By: bgamari

Subscribers: goldfire, thomie

Differential Revision: https://phabricator.haskell.org/D1909
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcRnTypes.hs