Book Image

Mastering Haskell Programming [Video]

By : Samuel Gélineau
Book Image

Mastering Haskell Programming [Video]

By: Samuel Gélineau

Overview of this book

<p>Haskell is a lazy, purely-functional programming language with a very precise type system. Each of these features make Haskell quite different from mainstream object-oriented programming languages, which is where Haskell's appeal and its difficulty lie.</p> <p>In this course, you’ll discover different ways to structure interactions between the program and the outside world. We’ll look at some subtler aspects of the IO monad, such as lazy IO and unsafePerformIO. In addition to the IO monad, we’ll also check out two other structured forms of interaction: streaming libraries and functional reactive programming.</p> <p>Then we explore parallel, concurrent, and distributed programming. Thanks to purity, Haskell is especially well-suited for the first two, and so there are a number of approaches to cover. As for distributed programming, we focus on the idea of splitting a large monolithic program into smaller microservices, asking whether doing so is a good idea. We’ll also consider a different way of interacting with other microservices, and explore an alternative to microservices.</p> <p>By the end of this course, you’ll have an in-depth knowledge of various aspects of Haskell, allowing you to make the most of functional programming in Haskell.</p> <h1>Style and Approach</h1> <p>This course includes in-depth content balanced with tutorials that put theory into practice. It will give you both an understanding and practical experience, enabling you to indulge in the art of functional programming with Haskell while taking you through core concepts.</p>
Table of Contents (6 chapters)
Chapter 5
Concurrent Programming in Haskell
Content Locked
Section 1
Manual Concurrency Using forkIO
In this video, we look at a few gotchas when writing code which forks threads. - First gotcha: threads terminate early if the main thread does - Second gotcha: an exception thrown in a child thread isn’t propagated to the rest of the program - Third gotcha: child threads survive their parents