Disallow users to write instances of KnownNat and KnownSym
authorsjorn3 <sean.r.innes@googlemail.com>
Mon, 2 Jan 2017 21:57:04 +0000 (21:57 +0000)
committerMatthew Pickering <matthewtpickering@gmail.com>
Mon, 2 Jan 2017 21:58:56 +0000 (21:58 +0000)
commitc5609577fab8a214c50561bea861c70d4bfd47c7
tree207b9434eccb75d8663f08c5290631aefb6c01c1
parent9ff07382ed377d38d677e8785b34536c39894467
Disallow users to write instances of KnownNat and KnownSym

As noted in #12837, these classes are special and the user should
not be able to define their own instances.

Test Plan: Validate

Reviewers: adamgundry, goldfire, mpickering, austin, bgamari

Reviewed By: goldfire, mpickering

Subscribers: goldfire, mpickering, thomie

Differential Revision: https://phabricator.haskell.org/D2898

GHC Trac Issues: #12837
compiler/typecheck/TcInstDcls.hs
testsuite/tests/typecheck/should_fail/T12837.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12837.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T