projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 2001-08-22 11:45:06 by sewardj]
[ghc-hetmet.git]
/
ghc
/
tests
/
typecheck
/
should_compile
/
tc117.hs
1
{-# OPTIONS -fglasgow-exts #-}
2
3
-- !!! Functional dependencies
4
-- This one gave another fail in tcReadMutVar
5
6
module M1 where
7
8
class HasFoo a foo | a -> foo where
9
foo :: a -> foo
10
instance HasFoo Int Int where
11
foo = id
12
13
instance HasFoo a b => HasFoo [a] b where
14
foo = foo . head
15
16
test:: [[Int]] -> Int
17
test = foo