The easiest way to check if a string is a palindrome would probably be to check if it's equal to the reversed version of itself:
isPalindrome :: String -> Bool
isPalindrome str = str == reverse str
But since you said you have to use head and tail, I'll demonstrate an implementation using these functions:
palindrome2::String -> Bool
palindrome2 [] = True
palindrome2 xs = head xs == last xs && palindrome2 (take (length xs - 2) (tail xs))
I'm not sure what you were trying to do with while. Perhaps some sort of confusion coming from an imperative language? This implementation works recursively, checking if the head of the list is equal to the last term and nesting in to the list if they are equal. Evaluation terminates if the first and last terms are not equal (the string is not a palindrome), or once the base case is reached (the string is a palindrome).
Note that the first implementation is much more efficient.
whileandnotEmptydon't exist at all.