[project @ 1998-04-17 15:58:37 by simonm]
[ghc-hetmet.git] / ghc / tests / typecheck / should_fail / Digraph.stderr
index 6efcc42..c576bf4 100644 (file)
@@ -1,34 +1,30 @@
  
-Digraph.hs:19: A type signature is more polymorphic than the inferred type
-                  Some type variables in the inferred type can't be forall'd, namely:
-                  `taXO'
-                  Possible cause: the RHS mentions something subject to the monomorphism restriction
-    When checking signature for `reversed_edges'
+Digraph.hs:19:
+    A type signature is more polymorphic than the inferred type
+       Can't for-all the type variable(s) `v'
+       in the type `[Edge v]'
+    When checking the type signature for `reversed_edges'
     In an equation for function `stronglyConnComp':
-       `stronglyConnComp es vs
-                         = PrelTup.snd (span_tree (new_range reversed_edges)
-                                                  (PrelBase.[], (PrelBase.[]))
-                                                  (PrelTup.snd (dfs (new_range es)
-                                                                    (PrelBase.[], (PrelBase.[]))
-                                                                    vs)))
-                         where
-                             span_tree r (vs, ns) PrelBase.[] = (vs, (ns))
-                             span_tree r (vs, ns) (x PrelBase.: xs)
-                                       | [x PrelList.elem vs] = span_tree r (vs, (ns)) xs
-                                       | [PrelBase.otherwise]
-                                       = span_tree r (vs', ((x PrelBase.: ns') PrelBase.: ns)) xs
-                                       where
-                                           (vs', ns')
-                                               = dfs r (x PrelBase.: vs, (PrelBase.[])) (r x)
-                             new_range PrelBase.[] w = PrelBase.[]
-                             new_range ((x, y) PrelBase.: xys) w
-                                       = if x PrelBase.== w then
-                                             (y PrelBase.: (new_range xys w))
-                                         else
-                                             (new_range xys w)
-                             swap (x, y) = (y, (x))
-                             reversed_edges :: _forall_ [v] (PrelBase.Eq v) => [Edge v]
-                             reversed_edges = PrelBase.map swap es'
+       stronglyConnComp es vs
+                        = snd (span_tree (new_range reversed_edges)
+                                         ([], ([]))
+                                         (snd (dfs (new_range es) ([], ([])) vs)))
+                        where
+                            span_tree r (vs, ns) [] = (vs, (ns))
+                            span_tree r (vs, ns) (x : xs)
+                                      | x elem vs = span_tree r (vs, (ns)) xs
+                                      | otherwise = span_tree r (vs', ((x : ns') : ns)) xs
+                                      where
+                                          (vs', ns') = dfs r (x : vs, ([])) (r x)
+                            new_range [] w = []
+                            new_range ((x, y) : xys) w
+                                      = if x == w then
+                                            (y : (new_range xys w))
+                                        else
+                                            (new_range xys w)
+                            swap (x, y) = (y, (x))
+                            reversed_edges :: _forall_ [v] (PrelBase.Eq v) => [Edge v]
+                            reversed_edges = map swap es
 
 
 Compilation had errors