summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/T4437.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-12-15 14:26:13 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-12-15 14:33:32 +0000
commit6eabb6ddb7c53784792ee26b1e0657bde7eee7fb (patch)
treeaf17a00ab5a30d1ab9a9a11a4786f0f239fe82b4 /testsuite/tests/driver/T4437.hs
parentb8ca64592e331005def4f734e026d5418950e6e1 (diff)
downloadhaskell-6eabb6ddb7c53784792ee26b1e0657bde7eee7fb.tar.gz
Allow recursive (undecidable) superclasses
This patch fulfils the request in Trac #11067, #10318, and #10592, by lifting the conservative restrictions on superclass constraints. These restrictions are there (and have been since Haskell was born) to ensure that the transitive superclasses of a class constraint is a finite set. However (a) this restriction is conservative, and can be annoying when there really is no recursion, and (b) sometimes genuinely recursive superclasses are useful (see the tickets). Dimitrios and I worked out that there is actually a relatively simple way to do the job. It’s described in some detail in Note [The superclass story] in TcCanonical Note [Expanding superclasses] in TcType In brief, the idea is to expand superclasses only finitely, but to iterate (using a loop that already existed) if there are more superclasses to explore. Other small things - I improved grouping of error messages a bit in TcErrors - I re-centred the haddock.compiler test, which was at 9.8% above the norm, and which this patch pushed slightly over
Diffstat (limited to 'testsuite/tests/driver/T4437.hs')
-rw-r--r--testsuite/tests/driver/T4437.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index 1b4f8e65ae..b6d04ef6c1 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -34,6 +34,7 @@ expectedGhcOnlyExtensions = ["RelaxedLayout",
"AlternativeLayoutRule",
"AlternativeLayoutRuleTransitional",
"OverloadedLabels",
+ "UndecidableSuperClasses",
"TemplateHaskellQuotes",
"MonadFailDesugaring",
"TypeInType"]