summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc040.hs
blob: 4897a2b9b36a087f7fa1fccbcbfc9b10e6920c8e (plain)
1
2
3
4
5
6
7
8
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]