Noob再次来到这里。在编写我自己的Haskell“程序”时弄湿了我的脚。偶然发现了这一点。 输入我自己的类型:
data Action = Action
{ idN :: IdN
, description :: Desc
, duedate :: Due
, donedate :: Done
} deriving (Ord, Show, Read, Eq)
已导入Data.Text.IO
。想要在Action
中写入具体信息以使用
TIO.appendFile "./Dbase.txt" typedAction
其中typedAction
是Action
类型的具体表示。现在Action
的类型不是Text
。
那我该怎么办?