summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc207.hs
blob: a5b952176b28ff92d8d2564efe87522daed187fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

-- Tests enhanced polymorphism

module ShouldCompile where

foo xs = let 
	   f :: Eq a => [a] -> [a]
	   f [] = []
	   f xs | null (g [True]) = [] 
		| otherwise       = tail (g xs) 

	   g :: Eq b => [b] -> [b]
	   g [] = []
	   g xs | null (f "hello") = [] 
		| otherwise       = tail (f xs) 
 	in f xs