Skip to Content
Learn Haskell by Example
book

Learn Haskell by Example

by Philipp Hagenlocher
December 2024
Beginner content levelBeginner
456 pages
13h 37m
English
Manning Publications
Content preview from Learn Haskell by Example

15 Transformers for synchronizing

This chapter covers

  • Using monad transformers to extend the abilities of monads
  • Structuring an application using a monad-transformer stack with a read-only environment, an event log, and state
  • Providing the application with command-line arguments, using the optparse-applicative package

In the last chapter, we began building an application to synchronize directory structures. We have also dealt with reading and writing files as well as handling exceptions. Now, we want to use this functionality to build the application.

To structure our program, we want to use monad transformers to more easily construct effectful computations that have access to read-only data, modify state, and collect output instead ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Get Programming with Haskell

Get Programming with Haskell

Will Kurt
Haskell in Depth

Haskell in Depth

Vitaly Bragilevsky

Publisher Resources

ISBN: 9781633438934Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link