Haskell可能使自己的文本类型实例

时间:2019-03-29 08:47:20

标签: haskell types io appendfile

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

其中typedActionAction类型的具体表示。现在Action的类型不是Text。 那我该怎么办?

0 个答案:

没有答案