Hierarchical Free Monads and Software Design in Functional Programming
Functional Programming is going through the same process of rethinking as Object Oriented Programming has passed already. FP today is not only something mystical, something barely applicable for day-to-day tasks, but rather a whole philosophy of building big, complex applications, with own tools, approaches and methodologies. We can see a lot of ideas about software design and architecture emerging from the FP community: talks, books, articles. We’re actively discussing Final Tagless, Free Monads, effect systems and other approaches, but it seems the theme not yet covered and we don’t know about possibilities we have.
In this talk, I’ll tell you about the power of Free Monads in building complex applications in Haskell and PureScript. These applications will be satisfying the requirements like maintainability, testability, simplicity. You’ll know how to create a safe concurrent application state, how to divide the application into layers and how to keep the code sane. In fact, you can do the same with Final Tagless or extensible effects, but the approach with hierarchical Free Monads has some specific properties making it the best tool to separate concerns and create a very interesting eDSLs with different semantics.
I’ve used these ideas to build software for different companies, including Juspay (Bengaluru), Restaumatic (Poland), Enecuum (Hong Kong). We’ve created several interesting technologies that were not possible to make without Free Monads. Some of them are open sourced.
Outline/Structure of the Talk
- Software Design in Functional Programming
- The main tasks of Software Design
- Inversion of Control: how, why, when
- Final Tagless vs Free Monads vs Effect systems vs Freer vs…
- Introduction into Software Design with Free Monads
- The key idea of Free Monads
- Layering the application
- Domain Model
- Business Logic Languages
- Application State
- Database Model
- Implementation layer
- Sample program
- Testing of Free Monad
- Functional testing
- Integration testing
The audience will learn about eDSLs design and semantics, about the ways of structuring of applications, about the importance of layering, about testing and other aspects of software design, - and all this based on the Hierarchical Free Monads approach.
Haskell, PureScript developers who wants to know more about software design in large in pure functional languages.
Prerequisites for Attendees
It's a nice idea to learn about why we need Final Tagless, Free Monads, Service Handle pattern.
The rough understanding of monads is preferred.
All the slides will be in Haskell / PureScript.
schedule Submitted 1 month ago
People who liked this proposal, also liked:
Harmeet Singh - Type System: The Beauty And The BeastHarmeet SinghModule Lead Software ConsultantKnoldus
schedule 1 month agoSold Out!
The type system plays an important role in building type-safe applications that reduce runtime exceptions and developer mistakes. This sophisticated system is leveraged by Scala’s most famous functional libraries, such as Scala-Cats and ScalaZ. This feature-rich system allows implementing pure functional programming on the JVM. It is a beast due to its complex syntax, as it prevents developers from exploring its beautiful aspects like partially applying types in Scala. In this talk, we will tame the beast and use its beauty to solve real-life issues faced during coding. Our examples will be based on generics, constraints, type lambdas, and the kind projector plugin.
The following are the learning objectives of this talk:
Practical use cases of the type system using real-life coding examples.
Implementing custom higher kinded types and handling partially applied types via type lambdas and the kind projector plugin.