This would all be much easier with pattern matching. For example:

instance Functor Val where
  fmap f (Val x) = Val (f x)

instance Applicative Val where
  pure = Val
  Val f <*> Val x = Val (f x)