| | I am finding functional dependencies confusing. (I suspect I am
| | not alone.) Should the following code work?
| |
| | class HasConverter a b | a -> b where
| |convert :: a -> b
| |
| | instance (HasConverter a b,Show b) => Show a where
| |show value = show (convert value)
|
| I
Mark P Jones wrote:
> | I am finding functional dependencies confusing. (I suspect I am
> | not alone.) Should the following code work?
> |
> | class HasConverter a b | a -> b where
> |convert :: a -> b
> |
> | instance (HasConverter a b,Show b) => Show a where
> |show value = show (con
| I am finding functional dependencies confusing. (I suspect I am
| not alone.) Should the following code work?
|
| class HasConverter a b | a -> b where
|convert :: a -> b
|
| instance (HasConverter a b,Show b) => Show a where
|show value = show (convert value)
It's a separate issue
George Russell writes:
> I am finding functional dependencies confusing. (I suspect I am not alone.)
> Should the following code work?
>
> class HasConverter a b | a -> b where
>convert :: a -> b
>
> instance (HasConverter a b,Show b) => Show a where
>show value = show (convert
I am finding functional dependencies confusing. (I suspect I am not alone.)
Should the following code work?
class HasConverter a b | a -> b where
convert :: a -> b
instance (HasConverter a b,Show b) => Show a where
show value = show (convert value)
___