The way to think about this problem, perhaps, is to imagine how much we do not know about your arguments a and a.
It is impossible, for instance, for us to say the following:
someFunc :: a -> a -> a
someFunc x y = x == y
This won't typecheck because we don't even know if a is an instance of the typeclass Eq. In other words, we have no useful information about these a things except that they are the same type of thing (whatever that may be).
Consider the identity function:
ident :: a -> a
ident x = ...
There is nothing this function can know about its sole argument x. There is, as a result, only one possible, valid result:
ident x = x
Nothing else works because there's nothing else we can assume about our argument.
Now, in your case, you have two arguments which can be absolutely anything in the universe. There is no possible assertion we can make about any behaviors these two arguments can conform to. Thus, we can define our function in possibly two different ways:
someFunc1 :: a -> a -> a
someFunc1 x y = x
OR
someFunc2 :: a -> a -> a
someFunc2 x y = y
There is no other valid way to represent this function.
aprobably indicates a type; with no constraints it's a type you know nothing about, which limits you to two implementations having signaturea -> a -> a. (I'm not a Haskell programmer but I think I know what the question's getting at.) - Jeffrey Bosbooma -> a -> ais just saying that the first two parameters have the same type. It doesn't mean they have the same name. - 4castlea -> a -> ameans that the function takes in two arguments of the same type typeaand returns a value of that same type. - puhlen