blob: 38e79743e4e2fb88e79946e36f66420019878cd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-- !!! Monomorphism restriction
module ShouldCompile where
foo :: Eq a => a -> b -> b
foo x y = y
-- Expect test2 :: forall b. b->b
-- despite the monomorphism restriction
poly = foo (3::Int)
-- Check that test2 is polymorphic
test = (poly True, poly 'c')
|