'What is the cause of the warning : Pattern match is redundant?

I am trying to solve an exercises that Convert Fahrenheit to Celsius and vice versa but I'm getting this warning:

Pattern match is redundant
In an equation for ‘tempToC’: tempToC temp = ...compile(-Woverlapping-patterns)

I am new to Haskell and need help understanding the cause of the warning.

module Temperature (tempToC, tempToF) where

{- Implement the function `tempToC` to convert
`  Fahrenheit to Celsius                    -}

tempToC :: Integer -> Float
tempToC temp = error "Implement this function."
tempToC temp = fromIntegral (temp - 32 ) / 1.8 --line of the warning

{- Implement the function `tempToF` to convert
   Celsius to Fahrenheit                    -}

tempToF :: Float -> Integer
tempToF temp = error "Implement this function."
tempToF temp = ceiling  (temp * 1.8 + 32) --line of the warning


Solution 1:[1]

You need to remove the lines tempToC temp = error "Implement this function." and tempToF temp = error "Implement this function.". Since temp just names a new variable, it will match anything, so those lines will prevent the lines below them from ever running.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joseph Sible-Reinstate Monica