An activity log is an ordered collection of events produced while an application runs. In a file-synchronization tool, it records successful copies, failures, and files skipped because synchronization was unnecessary. section 15.0 section 15.1.2
Model each event with a dedicated data constructor, then wrap the list in a newtype. The log can serve as the output accumulated by WriterT, while Semigroup and Monoid instances combine entries from separate computations. section 15.1.2
Printing a synchronization log
printLog :: Log -> IO () printLog (Log xs) = forM_ xs (putStrLn . prettyEntry) A command-line run can produce lines such as "[*] fileA.txt" for success, "[!] file.txt: exception" for failure, and "[s] file.txt: reason" for skipped work.













