This code is using Applicative Maybe. The structure is provided by Maybe and the value 1 is wrapped in this structure. No surprises here.

Prelude> pure 1 :: Maybe Int
Just 1
Prelude> :t (pure 1 :: Maybe Int)
(pure 1 :: Maybe Int) :: Maybe Int

...but can somebody explain the type of x below?

Prelude> x = pure 1
Prelude> x
1
Prelude> :t x
x :: (Applicative f, Num a) => f a

What is f here?

Thanks!