[Haskell-cafe] class-instance

Patrick Browne patrick.browne at dit.ie
Mon Jan 17 13:26:03 CET 2011

The code is not intended to fit into a larger application.
I am trying to understand instance-implements-class relation.
My experiment consists of writing simple English sentences and then
seeing how they could be specified and implemented in Haskell.
I am sure that this simple requirement could easily be coded in Haskell,
but I studying how to specify the requirement using type classes.

The bottom line is I want to stay with plain vanilla type classes.
If there is no simple way to do this using type classes then I am
obviously using the wrong technique.


On 17/01/2011 11:39, Henning Thielemann wrote:

> But I suspect, what you try to do is not what you need. If you tell us
> what you want to do, we can certainly give more helpful answers.
> Maybe you want to do something with functional dependencies, such that
> 'String' result type is automatically chosen if the argument type is
> 'Int'. But before suggesting this type extension, I'd like to know more
> about your problem.

I am trying to understand instance-implements-class relation.

This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie

More information about the Haskell-Cafe mailing list