Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{-# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters