This is the piece of code that I am trying to understand
data Day = Mon | Tue | Wed | Thu | Fri | Sat | Sun
isWeekend :: Day -> Bool
isWeekend Sat = True
isWeekend Sun = True
isWeekend _ = False
isWeekday :: Day -> Bool
isWeekday = not.isWeekend
If I am trying to evaluate isWeekday Mon (I specified an argument of type Day from the function definition even if the actual function does not have it), it works. If I am modifying the isWeekday into isWeekday day, I have the following error: Couldn't match expected type Bool' with actual type Day -> Bool'.
Could somebody please tell me why I have to skip the parameter which has the type Day?
Thank you!