On its own, a function of type a -> Bool, which is short for forall a. a -> Bool, isn’t much use, since it must work “for all a” that the caller specifies, so it’s not allowed to know anything about a. That’s why you’re getting responses saying basically “you can’t get there from here”.
(In fact, there are only two pure total functions with this type: alwaysTrue _ = True and alwaysFalse _ = False.)
But I’m guessing, based on this comment of yours:
I need a function that has and input of :: a -> Bool and it needs to calculate if a is a item in a specified list.
That your question is in the context of a function like this:
contains :: (a -> Bool) -> [a] -> Bool
Now we can do something useful! See, this type is short for forall a. (a -> Bool) -> [a] -> Bool, which is to say, it also operates on values of any type a, but again, the caller of this function is the one who chooses a, and passes in the predicate of type a -> Bool for some specific a, as well as a list of a values. So contains doesn’t know anything about a, but it does know that it can apply the predicate to the elements of the list, since they’re guaranteed to be of the same type.
So for example you can call this function with an argument of type Char -> Bool, which sets a to Char, or one of type Int -> Bool, which sets a to Int, and so on:
isABC :: Char -> Bool
isABC x = x `elem` "abc"
-- contains :: (a -> Bool) -> [a] -> Bool
-- contains isABC :: [Char] -> Bool
-- contains isABC "yeah" == True
-- contains isABC "nope" == False
is123 :: Int -> Bool
is123 x = x >= 1 && x <= 3
-- contains is123 :: [Int] -> Bool
-- contains is123 [] == False
-- contains is123 [0] == False
-- contains is123 [0, 1] == True
If you want to write this contains function yourself, you can use a recursive definition, with this general structure:
contains :: (a -> Bool) -> [a] -> Bool
contains predicate list = case list of
-- How can you test the current element with the predicate?
-- What should you do when the predicate returns true?
-- How can you test the rest of the list?
current : rest -> _
-- What should you return if you’ve reached the end?
[] -> _
The underscores are called typed holes, which you can include in your program to ask GHC to tell you what type it’s expecting there and give you some suggestions for functions and variables in scope that might fit. As you figure out how to fill in more details of your program, you can use more holes to ask for the types of more specific parts, e.g. you might replace the first hole with if _ then _ else _.
Something that may be helpful here is the TypeApplications extension (enabled in GHCi with :set -XTypeApplications or in a source file with {-# LANGUAGE TypeApplications #-}), which lets you write out the type arguments explicitly, e.g. in GHCi:
> :set -XTypeApplications
> contains :: (a -> Bool) -> [a] -> Bool; contains = error "TODO: implement 'contains'"
> :type contains @Char
contains @Char :: (Char -> Bool) -> [Char] -> Bool
> :type contains @Int
contains @Int :: (Int -> Bool) -> [Int] -> Bool
> :t map
map :: (a -> b) -> [a] -> [b]
> :t map @Double
map @Double :: (Double -> b) -> [Double] -> [b]
> :t map @Double @Int
map @Double @Int :: (Double -> Int) -> [Double] -> [Int]