projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 2001-08-04 06:19:54 by ken]
[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')