You've implemented comp2 just fine. You just don't use it right. The arguments to comp2 are both functions. Is 3 a function? I daresay not.
Haskell compilers have an extremely open mind though – GHC assumes that a -> b could possibly have a Num instance (which is what's required to use numerical literals). Hence it doesn't give an error like Couldn't match type `a -> b` with numerical literal `3`, but tries to go on with the assumption that there must be such an instance because you are invoking it. But to actually search for that instance, the compiler needs to have FlexibleContexts enabled.
Prelude> comp2 3 4
<interactive>:9:1:
Non type-variable argument in the constraint: Num (a -> b)
(Use FlexibleContexts to permit this)
When checking that ‘it’ has the inferred type
it :: forall a b c.
(Num (a -> b), Num (b -> b -> c)) =>
a -> a -> c
Prelude> :set -XFlexibleContexts
Prelude> comp2 3 4
<interactive>:11:1:
Could not deduce (Num (a -> b0))
from the context (Num (a -> b), Num (b -> b -> c))
bound by the inferred type for ‘it’:
(Num (a -> b), Num (b -> b -> c)) => a -> a -> c
at <interactive>:11:1-9
The type variable ‘b0’ is ambiguous
When checking that ‘it’ has the inferred type
it :: forall a b c.
(Num (a -> b), Num (b -> b -> c)) =>
a -> a -> c
Probable cause: the inferred type is ambiguous
This is still not as clear as we'd like, but it points out the problem: you try to use function types as number types.
comp2 == flip on, whereonis defined inData.Function.