e5766b5838cdf4e035b7195a11278e401d7c3a63
[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           vs :: [v]
8           es :: [Edge v]
9     Signature type:     forall v. (Eq v) => [Edge v]
10     Type to generalise: [Edge v]
11     When checking the type signature for `reversed_edges'
12     In an equation for function `stronglyConnComp':
13         stronglyConnComp es vs
14                            = snd (span_tree (new_range reversed_edges)
15                                             ([], [])
16                                             (snd (dfs (new_range es) ([], []) vs)))
17                            where
18                                swap (x, y) = (y, x)
19                                reversed_edges :: forall v. (Eq v) => [Edge v]
20                                reversed_edges = map swap es
21                                new_range [] w = []
22                                new_range ((x, y) : xys) w
23                                            = if x == w then
24                                                  (y : (new_range xys w))
25                                              else
26                                                  (new_range xys w)
27                                span_tree r (vs, ns) [] = (vs, ns)
28                                span_tree r (vs, ns) (x : xs)
29                                            | x `elem` vs = span_tree r (vs, ns) xs
30                                            | otherwise = span_tree r (vs', (x : ns') : ns) xs
31                                            where
32                                                (vs', ns') = dfs r (x : vs, []) (r x)