[project @ 1999-06-09 09:35:54 by simonpj]
[ghc-hetmet.git] / ghc / tests / typecheck / should_fail / Digraph.stderr
1
2 Digraph.hs:19:
3     Inferred type is less polymorphic than expected
4         Quantified type variable `v' escapes
5         It is mentioned in the environment
6         The following variables in the environment mention `v'
7             es :: [Edge v]
8             vs :: [v]
9     When checking the type signature
10         reversed_edges :: forall v1. (Eq v1) => [Edge v1]
11     In an equation for function `stronglyConnComp':
12         stronglyConnComp es vs
13                            = snd (span_tree (new_range reversed_edges)
14                                             ([], [])
15                                             (snd (dfs (new_range es) ([], []) vs)))
16                            where
17                                span_tree r (vs, ns) [] = (vs, ns)
18                                span_tree r (vs, ns) (x : xs)
19                                            | x `elem` vs = span_tree r (vs, ns) xs
20                                            | otherwise = span_tree r (vs', (x : ns') : ns) xs
21                                            where
22                                                (vs', ns') = dfs r (x : vs, []) (r x)
23                                new_range [] w = []
24                                new_range ((x, y) : xys) w
25                                            = if x == w then
26                                                  (y : (new_range xys w))
27                                              else
28                                                  (new_range xys w)
29                                swap (x, y) = (y, x)
30                                reversed_edges :: forall v. (Eq v) => [Edge v]
31                                reversed_edges = map swap es
32
33 Compilation had errors
34