Haskell possible make own type instance of Text

100 Views Asked by At

Noob here again. Getting my feet wet in making my own Haskell 'programs'. Stumbled across this. Made my own type:

data Action = Action 
  { idN         :: IdN
  , description :: Desc 
  , duedate     :: Due 
  , donedate    :: Done 
  } deriving (Ord, Show, Read, Eq) 

Imported Data.Text.IO. Want to write concrete info in Action to file using

TIO.appendFile "./Dbase.txt" typedAction

where typedAction is the concrete representation of the Action type. Now Action is not of type Text. So how would I go about this?

0

There are 0 best solutions below