Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dylan Yudaken
GHC
Commits
c9d1b379
Commit
c9d1b379
authored
Jul 15, 2011
by
Simon Peyton Jones
Browse files
Test Trac #5300
parent
6da03439
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_fail/T5300.hs
0 → 100644
View file @
c9d1b379
{-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-}
module
T5300
where
import
Control.Monad.State
(
StateT
)
class
C1
a
b
c
|
a
->
b
class
C2
a
b
c
data
T
b
=
T
f1
::
(
Monad
m
,
C1
a
b
c
)
=>
a
->
StateT
(
T
b
)
m
a
f1
f
=
undefined
f2
::
(
Monad
m
,
C1
a1
b1
c1
,
C2
a2
b2
c2
)
=>
a1
->
StateT
(
T
b2
)
m
a2
f2
fm
=
f1
fm
>>=
return
.
undefined
testsuite/tests/ghc-regress/typecheck/should_fail/T5300.stderr
0 → 100644
View file @
c9d1b379
T5300.hs:15:9:
Ambiguous type variable `c0' in the constraint:
(C1 a1 b2 c0) arising from a use of `f1'
Probable fix: add a type signature that fixes these type variable(s)
In the first argument of `(>>=)', namely `f1 fm'
In the expression: f1 fm >>= return . undefined
In an equation for `f2': f2 fm = f1 fm >>= return . undefined
testsuite/tests/ghc-regress/typecheck/should_fail/all.T
View file @
c9d1b379
...
...
@@ -242,3 +242,4 @@ test('FailDueToGivenOverlapping', normal, compile_fail, [''])
test
('
LongWayOverlapping
',
normal
,
compile_fail
,
[''])
test
('
T5236
',
normal
,
compile_fail
,[''])
test
('
T5246
',
normal
,
compile_fail
,[''])
test
('
T5300
',
normal
,
compile_fail
,[''])
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