blob: a2f7d003a7fd6a04741d9226ca0853b292f9489d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
-- Trac #1795
module ShouldCompile where
data A a = A
class MkA a b | a -> b where
mkA :: a -> A b
instance MkA a a where
translate :: (String, a) -> A a
translate a = mkA a
{- From the call to mkA
[W] MkA alpha beta
[W] alpha ~ (String,a)
[W] A beta ~ A a
==> beta:=a, alpha:=(String,a)
-}
|