class Foobar a b where
foobar :: a - b - Int
instance Foobar String Int where ...
instance Foobar Int String where ...
2009/2/13 Daniel Kraft d...@domob.eu:
Hi,
I just came across a problem like this: Suppose I've got two related
functions that do similar things, and I want to call them
If you have two functions that do two different things, then they
certainly OUGHT to have different names.
You can of course put the two functions in different modules. Then
they do have different (qualified) names.
2009/2/13 Daniel Kraft d...@domob.eu:
Hi,
I just came across a problem like
On Fri, 2009-02-13 at 13:25 +0300, Eugene Kirpichov wrote:
class Foobar a b where
foobar :: a - b - Int
instance Foobar String Int where ...
instance Foobar Int String where ...
But we typically do not to this. It's ugly. Classes work nicely when
there is some kind of parametrisation
Hi,
I just came across a problem like this: Suppose I've got two related
functions that do similar things, and I want to call them the same...
Like in:
foobar :: String - Int - Int
foobar :: Int - String - Int
(Bad example, but I hope you got the point.)
Is this kind of overloading
Daniel Kraft wrote:
Hi,
I just came across a problem like this: Suppose I've got two related
functions that do similar things, and I want to call them the same...
Like in:
foobar :: String - Int - Int
foobar :: Int - String - Int
(Bad example, but I hope you got the point.)