It means that 2 has type a (which must be in the Num class), 3 has type (a -> t) (which also must be in the Num class), and the type of (3 2) is therefore t.
When you apply one expression to another, the first must have function type, and the second must have the type of the domain of the function, hence the a -> t and a.Furthermore, the numeric literals are always interpreted as being in the Num class.
I haven't been able to find any good introduction to numeric literals and the Num class with quick search, so if anyone else on list can point us to one (if it exists) that would be great.

Re: need help with understanding expression

It's important to remember that numeric literals are polymorphic. That is, 3 :: Num a => a. They do not have monomorphic types such as Int or Integer.

In the above, GHCi is inferring the principal type of 3 applied to 2. Since 3 is in the position of function application, it should have a function type, e.g. a -> t. And 2 is the argument to 3, so it has the type 'a'. But there must be Num constraints on these types, and that's what the context (Num a, Num (a -> t)) is telling you. Num (a -> t) is a strange constraint but so is applying 3 to 2. Whenever you see a Num constraint on a function type, it probably means you're doing something wrong.

You might find the (brief) description of typing numeric literals in the language definition helpful:

I am having hard time understanding how removing the outer parenthesis in(max.(+1)) 2 2 to max.(+1) 2 2

Keep in mind the precedence of the function composition operator (.) here:

Prelude> :i (.)

(.) :: (b -> c) -> (a -> b) -> a -> c -- Defined in GHC.Base

infixr 9 .

Function application is infixl 10, so even though max . (+1) :: (Num b, Ord b) => b -> b -> b, when you do max . (+1) 2, the application of (+1) to 2 binds more tightly than (.).

A common idiom for removing parentheses with a sequence of compositions is to use ($):

Prelude> :i ($)

($) :: (a -> b) -> a -> b -- Defined in GHC.Base

infixr 0 $

Note that it has the lowest possible precedence. So, you often see the composition of functions as f . g . h $ arg. But this doesn't work well for (curried) functions with 2 arguments. So, in your case, I'd guess the parentheses is simplest idiomatic solution. Though, I think I'd prefer max (succ 2) 2.

In other words, how the first one does make "sense" (however strange the "sense" may seem) to GHC while the second one doesn't?

Now let's consider the evaluation scenario:

Prelude> 3 2

<interactive>:1:0: No instance for (Num (t -> t1)) arising from the literal `3' at <interactive>:1:0-2 Possible fix: add an instance declaration for (Num (t -> t1))
In the expression: 3 2 In the definition of `it': it = 3 2

Note, how the GHC suggests us this "strange constraint" as a possible fix BUT see this:

It's important to remember that numeric literals are polymorphic. That is, 3 :: Num a => a. They do not have monomorphic types such as Int or Integer.

In the above, GHCi is inferring the principal type of 3 applied to 2. Since 3 is in the position of function application, it should have a function type, e.g. a -> t. And 2 is the argument to 3, so it has the type 'a'. But there must be Num constraints on these types, and that's what the context (Num a, Num (a -> t)) is telling you. Num (a -> t) is a strange constraint but so is applying 3 to 2. Whenever you see a Num constraint on a function type, it probably means you're doing something wrong.

You might find the (brief) description of typing numeric literals in the language definition helpful:

I am having hard time understanding how removing the outer parenthesis in(max.(+1)) 2 2 to max.(+1) 2 2

Keep in mind the precedence of the function composition operator (.) here:

Prelude> :i (.)

(.) :: (b -> c) -> (a -> b) -> a -> c -- Defined in GHC.Base

infixr 9 .

Function application is infixl 10, so even though max . (+1) :: (Num b, Ord b) => b -> b -> b, when you do max . (+1) 2, the application of (+1) to 2 binds more tightly than (.).

A common idiom for removing parentheses with a sequence of compositions is to use ($):

Prelude> :i ($)

($) :: (a -> b) -> a -> b -- Defined in GHC.Base

infixr 0 $

Note that it has the lowest possible precedence. So, you often see the composition of functions as f . g . h $ arg. But this doesn't work well for (curried) functions with 2 arguments. So, in your case, I'd guess the parentheses is simplest idiomatic solution. Though, I think I'd prefer max (succ 2) 2.

In other words, in the expression 3 "a" ghc doesn't know, what type 3 belongs to, it just knows that it should be of class Num. In particular, it could be of type "String -> t" for some t, ghc wouldn't go over all possible types to see that there is no such instance of "Num".

On the other hand, in "a" 3 it knows exactly what type "a" is, strings are always of one type, "String" (which is an alias for [Char]). You can enable OverloadedStrings extension, which makes string literals polymorphic; then you'll have your type, which would be something like "(IsString (a -> b), Num a) => b".

Now let's consider the evaluation scenario:

Prelude> 3 2

<interactive>:1:0: No instance for (Num (t -> t1)) arising from the literal `3' at <interactive>:1:0-2 Possible fix: add an instance declaration for (Num (t -> t1))
In the expression: 3 2 In the definition of `it': it = 3 2

Note, how the GHC suggests us this "strange constraint" as a possible fix BUT see this:

Same thing. "String" is NOT a functional type, and it would never be, while it's possible (and sometimes reasonable) to have a functional type of class "Num". Enable OverloadedStrings, and you'll see your desired "possible fix".