putStrLn "Enter the Artist Name"
art <- getLine
putStrLn "Enter the Number of CD's"
num <- getLine
let test= buyItem currentStockBase art num
printListIO (showcurrentList test)
我必须为 buyItem 传递的值是
buyItem currentStockBase "Akon" 20
但我想将“Akon”发送到艺术,20 我想发送 num
它给了我这个错误
ERROR file:.\Project2.hs:126 - Type error in application
*** Expression : buyItem currentStockBase art num
*** Term : num
*** Type : [Char]
*** Does not match : Int
请帮我