git.haskell.org
/
ghc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Complete work on new OVERLAPPABLE/OVERLAPPING pragmas (Trac #9242)
[ghc.git]
/
testsuite
/
tests
/
typecheck
/
should_fail
/
tcfail121.hs
1
2
{-# LANGUAGE FlexibleInstances #-}
3
4
module
ShouldFail
where
5
6
class
Foo a
where
7
op
::
a
->
a
8
9
instance
{-# OVERLAPPABLE #-}
Foo a
=>
Foo
[
a
]
10
instance
{-# OVERLAPPING #-}
Foo
[
Int
]
11
12
foo
::
Foo a
=> [
a
] -> [
a
]
13
foo x
=
op x
14
-- Correct instance depends on instantiation of 'a'