
Hello! I have a function activityIndicator, which has an argument of class Customer and should return a numeric value. The module is defined as follows. <module-definition> data Purchase = Purchase { price, rebate :: Double } deriving (Show, Eq) data Customer = Customer { id :: Int, purchases :: [Purchase] } activityIndicator :: Customer -> Num activityIndicator (Customer id purchases) = length purchases </module-definition> When I try to load this module into GHCi, I get this error: <error-message> Class `Num' used as a type In the type: Customer -> Num While checking the type signature for `activityIndicator' </error-message> When I remove the line activityIndicator :: Customer -> Num the error disappears. What is wrong in the signature above? TIA Dmitri Pissarenko