Treat isConstraintKind more consistently
[ghc.git] / testsuite / tests / typecheck / should_compile / all.T
index cfc4eff..dfa8520 100644 (file)
@@ -165,7 +165,7 @@ test('tc161', normal, compile, [''])
 test('tc162', normal, compile, [''])
 test('tc163', normal, compile, [''])
 test('tc164', normal, compile, [''])
-test('tc165', expect_broken_for(10181, ['optasm', 'optllvm']), compile, [''])
+test('tc165', normal, compile, [''])
 test('tc166', normal, compile, [''])
 test('tc167', normal, compile, [''])
 test('tc168', normal, compile_fail, [''])
@@ -188,7 +188,7 @@ test('tc179', normal, compile, [''])
 test('tc180', normal, compile, [''])
 test('tc181', normal, compile, [''])
 test('tc182', normal, compile, [''])
-test('tc183', reqlib('mtl'), compile, [''])
+test('tc183', normal, compile, [''])
 test('tc184', normal, compile, [''])
 test('tc185', normal, compile, [''])
 test('tc186', normal, compile, [''])
@@ -225,13 +225,13 @@ test('tc215', normal, compile, [''])
 # This one is very delicate, but I don't think the result really matters
 test('tc216', normal, compile, [''])
 
-test('tc217', reqlib('mtl'), compile, [''])
+test('tc217', normal, compile, [''])
 test('tc218', normal, compile, [''])
 test('tc219', normal, compile, [''])
-test('tc220', [reqlib('mtl'), reqlib('syb')], compile, [''])
+test('tc220', [reqlib('syb')], compile, [''])
 test('tc221', normal, compile, [''])
 test('tc222', normal, compile, [''])
-test('tc223', reqlib('mtl'), compile, [''])
+test('tc223', normal, compile, [''])
 test('tc224', normal, compile, [''])
 test('tc225', normal, compile, [''])
 test('tc226', normal, compile, [''])
@@ -240,7 +240,7 @@ test('tc228', normal, compile, [''])
 test('tc229', normal, compile, [''])
 test('tc230', normal, compile, [''])
 test('tc231', normal, compile, [''])
-test('tc232', reqlib('mtl'), compile, [''])
+test('tc232', normal, compile, [''])
 test('tc233', normal, compile, [''])
 test('tc234', normal, compile, [''])
 test('tc235', normal, compile, [''])
@@ -305,7 +305,7 @@ test('T1123', normal, compile, [''])
 test('T3692', normal, compile, [''])
 test('T700',  normal, compile, [''])
 test('T4361', normal, compile, [''])
-test('T4355', reqlib('mtl'), compile, [''])
+test('T4355', normal, compile, [''])
 test('T1634', normal, compile, [''])
 test('T4401', normal, compile, [''])
 test('T4404', normal, compile, ['-Wall'])
@@ -383,11 +383,22 @@ test('T7050', normal, compile, ['-O'])
 test('T7312', normal, compile, [''])
 test('T7384', normal, compile, [''])
 test('T7451', normal, compile, [''])
-test('holes', normal, compile, ['-fdefer-type-errors'])
-test('holes2', normal, compile, ['-fdefer-type-errors'])
-test('holes3', normal, compile_fail, [''])
-test('hole_constraints', normal, compile, ['-fdefer-type-errors'])
-test('hole_constraints_nested', normal, compile, ['-fdefer-type-errors'])
+test('holes', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('holes2', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('holes3', normal, compile_fail, ['-fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('hole_constraints', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('hole_constraints_nested', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('valid_hole_fits', [extra_files(['ValidHoleFits.hs'])],
+    multimod_compile, ['valid_hole_fits','-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('local_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('subsumption_sort_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fsort-by-subsumption-hole-fits'])
+test('valid_hole_fits_interactions', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('refinement_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2'])
+test('abstract_refinement_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -fabstract-refinement-hole-fits -funclutter-valid-hole-fits'])
+test('free_monad_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -funclutter-valid-hole-fits'])
+test('constraint_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -funclutter-valid-hole-fits'])
+test('type_in_type_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('T15370', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
 test('T7408', normal, compile, [''])
 test('UnboxStrictPrimitiveFields', normal, compile, [''])
 test('T7541', normal, compile, [''])
@@ -494,6 +505,7 @@ test('T11401', normal, compile, [''])
 test('T11699', normal, compile, [''])
 test('T11512', normal, compile, [''])
 test('T11754', normal, compile, [''])
+test('T11766', normal, compile, [''])
 test('T11811', normal, compile, [''])
 test('T11793', normal, compile, [''])
 test('T11348', normal, compile, [''])
@@ -510,6 +522,7 @@ test('T11339c', normal, compile, [''])
 test('T11339d', normal, compile, [''])
 test('T11974', normal, compile, [''])
 test('T12067', [], multimod_compile, ['T12067', '-v0'])
+test('T12104', normal, compile, ['-fdefer-type-errors'])
 test('T12185', normal, compile, [''])
 test('T12133', normal, compile, [''])
 test('T12381', normal, compile, [''])
@@ -527,11 +540,12 @@ test('T12734a', normal, compile_fail, [''])
 test('T12763', normal, compile, [''])
 test('T12785a', normal, compile, [''])
 test('T12797', normal, compile, [''])
+test('T12850', normal, compile, [''])
 test('T12911', normal, compile, [''])
 test('T12925', normal, compile, [''])
-test('T12919', expect_broken(12919), compile, [''])
+test('T12919', normal, compile, [''])
 test('T12936', normal, compile, [''])
-test('T13050', normal, compile, ['-fdefer-type-errors'])
+test('T13050', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
 test('T13083', normal, compile, [''])
 test('T11723', normal, compile, [''])
 test('T12987', normal, compile, [''])
@@ -548,3 +562,86 @@ test('T13337', normal, compile, [''])
 test('T13343', normal, compile, [''])
 test('T13458', normal, compile, [''])
 test('T13490', normal, compile, [''])
+test('T13474', normal, compile, [''])
+test('T13524', normal, compile, [''])
+test('T13509', normal, compile, [''])
+test('T13526', normal, compile, [''])
+test('T13594', normal, compile_fail, [''])
+test('T13603', normal, compile, [''])
+test('T13333', normal, compile, [''])
+test('T13585', [extra_files(['T13585.hs', 'T13585a.hs', 'T13585b.hs'])], run_command, ['$MAKE -s --no-print-directory T13585'])
+test('T13651', normal, compile_fail, [''])
+test('T13651a', normal, compile, [''])
+test('T13680', normal, compile, [''])
+test('T13785', normal, compile, [''])
+test('T13804', normal, compile, [''])
+test('T13822', normal, compile, [''])
+test('T13848', normal, compile, [''])
+test('T13871', normal, compile, [''])
+test('T13879', normal, compile, [''])
+test('T13881', normal, compile, [''])
+test('T13915a', expect_broken(15245), multimod_compile, ['T13915a', '-v0'])
+test('T13915b', expect_broken(15245), compile, [''])
+test('T13984', normal, compile, [''])
+test('T14128', normal, multimod_compile, ['T14128Main', '-v0'])
+test('T14149', normal, compile_fail, [''])
+test('T14154', normal, compile, [''])
+test('T14158', normal, compile, [''])
+test('T13943', normal, compile, ['-fsolve-constant-dicts'])
+test('T14333', normal, compile, [''])
+test('T14363', normal, compile, [''])
+test('T14363a', normal, compile, [''])
+test('T7169', normal, compile, [''])
+test('T14396', [extra_files(['T14396.hs', 'T14396.hs-boot', 'T14396a.hs', 'T14396b.hs', 'T14396f.hs'])], multimod_compile, ['T14396', '-v0'])
+test('T14434', [], run_command, ['$MAKE -s --no-print-directory T14434'])
+test('MissingExportList01', normal, compile, [''])
+test('MissingExportList02', normal, compile, [''])
+test('T14488', normal, compile, [''])
+test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+# We omit the hpc/profasm ways because this test checks the
+# desugarer's output and these ways add some
+# annotations/ticks that prevent it from giving the exact
+# output we expect (T13032.stderr).
+test('T13032', omit_ways(['hpc', 'profasm']), compile, [''])
+test('T14273', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('T14732', normal, compile, [''])
+test('T14774', [], run_command, ['$MAKE -s --no-print-directory T14774'])
+test('T14763', normal, compile, [''])
+test('T14811', normal, compile, [''])
+test('T14934', [extra_files(['T14934.hs', 'T14934a.hs'])], run_command,
+               ['$MAKE -s --no-print-directory T14934'])
+test('T13643', normal, compile, [''])
+test('SplitWD', normal, compile, [''])
+# we omit profasm because it fails with:
+# T14441.hs:1:1: fatal:
+#     Cannot load -prof objects when GHC is built with -dynamic
+#     To fix this, either:
+#       (1) Use -fexternal-interpreter, or
+#       (2) Build the program twice: once with -dynamic, and then
+#           with -prof using -osuf to set a different object file suffix.
+test('T14441', omit_ways(['profasm']), compile, [''])
+test('T15050', [expect_broken(15050)], compile, [''])
+test('T14735', normal, compile, [''])
+test('T15180', normal, compile, [''])
+test('T15232', normal, compile, [''])
+test('T13833', normal, compile, [''])
+
+def onlyHsParLocs(x): 
+    """ 
+    We only want to check that all the parentheses are present with the correct location, 
+    not compare the entire typechecked AST.
+    Located (HsPar GhcTc) are pretty printed with the form
+    ({ <location info>
+     (HsPar
+    This function tries to extract all such location infos from the typechecked AST.
+    """
+    ls = x.split("\n")
+    filteredLines = (loc.strip() for (loc,hspar) in zip(ls,ls[1:]) 
+                      if hspar.strip().startswith("(HsPar")
+                        and not "<no location info>" in loc)
+    return '\n'.join(filteredLines)
+test('T15242', normalise_errmsg_fun(onlyHsParLocs), compile, [''])
+test('T15431', normal, compile, [''])
+test('T15431a', normal, compile, [''])
+test('T15428', normal, compile, [''])
+test('T15412', normal, compile, [''])