X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftests%2Ftypecheck%2Fshould_succeed%2Ftc040.hs;fp=ghc%2Fcompiler%2Ftests%2Ftypecheck%2Fshould_succeed%2Ftc040.hs;h=33113cc07d79899897db6cbd4d920ded7f0b1fdc;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/compiler/tests/typecheck/should_succeed/tc040.hs b/ghc/compiler/tests/typecheck/should_succeed/tc040.hs new file mode 100644 index 0000000..33113cc --- /dev/null +++ b/ghc/compiler/tests/typecheck/should_succeed/tc040.hs @@ -0,0 +1,9 @@ +module ShouldSucceed where + +--!!! tests the deduction of contexts. + +f :: (Eq a) => a -> [a] + +f x = g x + where + g y = if (y == x) then [] else [y]