Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
8f2f4e87
Commit
8f2f4e87
authored
Aug 01, 2007
by
simonpj
Browse files
Add test for Trac #1564
parent
c49f83ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
View file @
8f2f4e87
...
...
@@ -247,6 +247,7 @@ test('tc231', normal, compile, [''])
test
('
tc232
',
reqlib
('
mtl
'),
compile
,
[''])
test
('
tc233
',
normal
,
compile
,
[''])
test
('
tc234
',
normal
,
compile
,
[''])
test
('
tc235
',
normal
,
compile
,
[''])
test
('
faxen
',
normal
,
compile
,
[''])
...
...
testsuite/tests/ghc-regress/typecheck/should_compile/tc235.hs
0 → 100644
View file @
8f2f4e87
{-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
-- Trac #1564
module
Foo
where
import
Text.PrettyPrint
import
Prelude
hiding
(
head
,
tail
)
class
FooBar
m
k
l
|
m
->
k
l
where
a
::
m
graphtype
instance
FooBar
[]
Bool
Bool
where
a
=
error
"urk"
instance
FooBar
Maybe
Int
Int
where
a
=
error
"urk"
class
(
Monad
m
)
=>
Gr
g
ep
m
|
g
->
ep
where
x
::
m
Int
v
::
m
Int
instance
(
Monad
m
,
FooBar
m
x
z
)
=>
Gr
g
ep
m
where
x
=
error
"urk"
v
=
error
"urk"
-- Old GHC claims for y: y :: (Monad m, FooBar m GHC.Prim.Any GHC.Prim.Any)
-- => m Int (which is wrong)
-- The uses in foo and bar show if that happens
y
()
=
x
foo
::
[
Int
]
foo
=
y
()
bar
::
Maybe
Int
bar
=
y
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment