Treat isConstraintKind more consistently
[ghc.git] / testsuite / tests / typecheck / should_compile / all.T
index 8a7a7da..dfa8520 100644 (file)
@@ -398,6 +398,7 @@ test('abstract_refinement_hole_fits', normal, compile, ['-fdefer-type-errors -fn
 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('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, [''])
 test('T7408', normal, compile, [''])
 test('UnboxStrictPrimitiveFields', normal, compile, [''])
 test('T7541', normal, compile, [''])
@@ -623,3 +624,24 @@ test('T15050', [expect_broken(15050)], compile, [''])
 test('T14735', normal, compile, [''])
 test('T15180', normal, compile, [''])
 test('T15232', normal, 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, [''])