Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5903c067
Commit
5903c067
authored
Sep 02, 2002
by
simonpj
Browse files
[project @ 2002-09-02 16:30:17 by simonpj]
Add rank-N test
parent
f81e5360
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
View file @
5903c067
...
...
@@ -158,3 +158,4 @@ test('tc157', normal, compile, [''])
test
('
tc158
',
normal
,
compile
,
[''])
test
('
tc159
',
normal
,
compile
,
[''])
test
('
tc160
',
normal
,
compile
,
[''])
test
('
tc161
',
normal
,
compile
,
[''])
testsuite/tests/ghc-regress/typecheck/should_compile/tc161.hs
0 → 100644
View file @
5903c067
{-# OPTIONS -fglasgow-exts #-}
-- Blew up GHC 5.04, with:
-- Ambiguous type variable(s) `q' in the constraint `Foo q'
-- arising from a function with an overloaded argument type at Foo.hs:7
-- Expected type: Int -> (forall q1. (Foo q1) => q1 -> a) -> a
-- Inferred type: Int -> (q -> a) -> a
-- In the application `GHC.Err.noMethodBindingError "Foo.hs:7|Foo.foo"#'
--
-- Fix is to give wild-card args to the default methods
-- See TcClassDcl.mkDefMethRhs
module
ShouldCompile
where
class
Foo
a
where
op
::
Eq
c
=>
c
->
(
forall
b
.
Eq
b
=>
b
->
b
)
->
a
->
a
instance
Foo
Int
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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