0
我有以下幾種類型:推導查看代數數據類型
data Suit = Club | Diamond | Heart | Spade deriving Show
data Rank = R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | Jack | Queen | King | Ace deriving Show
data JokerColor = Red | Black deriving Show
data JCard = NormalCard Suit Rank | JokerCard JokerColor
我怎麼能顯示JCard?目前我得到No instance for (Show JCard)
謝謝!我以前得到無關的錯誤,並認爲這個語法是不正確的... – 2012-03-11 15:56:16