summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc047.hs
blob: b8c197d185f09f42eb3d48e1d32247a5a30499d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module ShouldSucceed where

type OL a =  [a]

-- produces the interface:
-- data OL a = MkOL [a] deriving ()
-- ranOAL :: (OL (a, a)) -> [a]
-- this interface was produced by BOTH hbc and nhc

-- the following bogus type sig. was accepted by BOTH hbc and nhc
f x = ranOAL where -- ranOAL :: OL (a,v) -> [a]
--ranOAL :: OL (a,v) -> [v], the right sig.
		   ranOAL ( xs) = mp sd xs


mp f [] = []
mp f (x:xs) = (f x) : mp f xs

sd (f,s) = s