diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-02-21 15:00:03 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-02-21 15:54:29 +0000 |
commit | c7508083388a71d76a5b6f1e46adfbcffba74b96 (patch) | |
tree | dd86bb37abea5c55d483f662be8ad79a23a193d0 /testsuite/tests/polykinds/T13267.hs | |
parent | e3e218e2785400efb824f6652f8927690adebd20 (diff) | |
download | haskell-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.hs | 10 |
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 |