[project @ 2001-08-22 11:45:06 by sewardj]
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / tc113.hs
1 -- !!! Monomorphism restriction
2
3 module ShouldCompile where
4
5 foo :: Eq a => a -> b -> b
6 foo x y = y
7
8 -- Expect test2 :: forall b. b->b
9 -- despite the monomorphism restriction
10 poly = foo (3::Int)
11
12 -- Check that test2 is polymorphic
13 test = (poly True, poly 'c')