我是 Haskell 的新手,我不知道出了什么问题。
data Stmt = If BExpr Stmt
| While BExpr Stmt
| Assign String AExpr
deriving (Eq, Show)
printStmt :: Stmt -> String
printStmt (If e, s1) = "if " ++ (printBExpr e) ++ " {" ++ (printStmt s1) ++ " }"
printStmt (While e, s) = "while" ++ (printBExpr e) ++ "{" ++ (printStmt s) ++ "}"
printStmt (Assign s, e) = s ++ ":=" ++ (printAExpr e)
谁能告诉我这里出现“与预期类型不匹配”的错误?