SCC analysis for instances as well as types/classes
[ghc.git] / testsuite / tests / typecheck / should_compile / tc047.hs
1 module ShouldSucceed where
2
3 type OL a = [a]
4
5 -- produces the interface:
6 -- data OL a = MkOL [a] deriving ()
7 -- ranOAL :: (OL (a, a)) -> [a]
8 -- this interface was produced by BOTH hbc and nhc
9
10 -- the following bogus type sig. was accepted by BOTH hbc and nhc
11 f x = ranOAL where -- ranOAL :: OL (a,v) -> [a]
12 --ranOAL :: OL (a,v) -> [v], the right sig.
13 ranOAL ( xs) = mp sd xs
14
15
16 mp f [] = []
17 mp f (x:xs) = (f x) : mp f xs
18
19 sd (f,s) = s
20
21
22
23