菜鸟又来了。在制作我自己的 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
。那么我该怎么做呢?