summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T13267.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-02-21 15:00:03 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-02-21 15:54:29 +0000
commitc7508083388a71d76a5b6f1e46adfbcffba74b96 (patch)
treedd86bb37abea5c55d483f662be8ad79a23a193d0 /testsuite/tests/polykinds/T13267.hs
parente3e218e2785400efb824f6652f8927690adebd20 (diff)
downloadhaskell-c7508083388a71d76a5b6f1e46adfbcffba74b96.tar.gz
Disallow class instances for synonyms
See Trac #13267 and Note [Instances and constraint synonyms] in TcValidity. We can't easily do a perfect job, because the rename is really trying to do its lookup too early. But this is at least an improvement.
Diffstat (limited to 'testsuite/tests/polykinds/T13267.hs')
-rw-r--r--testsuite/tests/polykinds/T13267.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T13267.hs b/testsuite/tests/polykinds/T13267.hs
new file mode 100644
index 0000000000..cfc7efbffc
--- /dev/null
+++ b/testsuite/tests/polykinds/T13267.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE ConstraintKinds, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}
+module T13267 where
+
+type C1 a = (Show (a -> Bool))
+
+instance C1 Int where
+
+type C2 a = (Show Bool, Show Int)
+
+instance C2 Int where