Book #25 - Haskell in Depth
Haskell in Depth
by Vitaly Bragilevsky (2021)
Meetup: https://www.meetup.com/the-south-padre-island-reading-group/events/291151890/
Zoom: https://us02web.zoom.us/j/84281187589
Discord: https://bit.ly/35RhGXM
Manning: https://www.manning.com/books/haskell-in-depth
Source code (zip): https://www.manning.com/downloads/1929
Source code (github): https://github.com/bravit/hid-examples
Chapter 16 January 23, 2023 | Presenter |
---|---|
16.1.1 An implementation of concurrency in GHC | Casey - January 23 |
16.1.2 Low-level concurrency with threads | Jens - January 23 |
16.1.3 High-level concurrency with the async package | Sergey - January 23 |
16.2.1 Synchronization and communication | Casey
|
16.2.1 part 2: Channels | Weining |
16.2.2 Software transactional memory | Sergey |
16.2.2 part 2: STM queues and channels | Jens |
Chapter 15 December 12, 2022 | Presenter |
---|---|
15.1 Setting up an example | Casey - December 12 |
15.2 Haskell database connectivity | Weining - December 12 |
15.3 The postgresql-simple library | Jens - December 12 |
15.4 The hasql ecosystem | Jens - January 9 |
15.5 Generating SQL with opaleye | Jens - January 9 |
Chapter 14 October 17, 2022 | Presenter |
---|---|
14.1 Streaming data | Casey - October 17 |
14.1.1 (part 2) | Jens - October 30 |
14.1.1 (part 3) | Weining - October 30 |
14.1.2 The streaming package | Jens - October 30 |
14.1.2 (part 2) | Omar - October 30 |
14.1.2 (part 3) | Casey - November 14 |
14.2 Approaching an Implementation of pipeline stages | Sergey - November 14 |
14.2.2 Parsing data with parser combinators | Jens - November 14 |
14.2.3 Accessing data with lenses | Sergey - November 14 |
14.3 Example: Processing COVID-19 data | Jens - November 28 |
14.3.2 Processing data | Jens - November 28 |
14.3.3 Organizing the data | Jens - November 28 |
Chapter 13 September 5, 2022 | Presenter |
---|---|
13.1 Types for presenting a web API | Casey - Sep 5 |
13.1.2 Implementing a web service with servant | Sergey- Sep 19 |
13.2 Towards dependent types with singletons | Weining - Sep 19 |
13.2.2 Example: Unsafe interface for elevators | Weining - Sep 19 |
13.2.3 Dependent types and substituting them with singletons | Jens - Sep 19 |
Discussion of code examples involving Servant | Omar - pending |
Discussion of paper “Propositions as Types” by Philip Wader | Jens - pending |
13.2.4 Example: Safe interface for elevators | Jens - pending |
Chapter 12 July 27, 2022 | Presenter |
---|---|
12.1 Deriving Instances | Casey - July 27 |
12.1.2 The problem of type safety and generalized newtype deriving | Jens - July 27 |
12.1.3 Deriving by an example with DerivingVia | Weining - July 27 |
Deriving Via by Baldur Blöndal, Andres Löh, and Ryan Scott | Weining - August 3 |
12.2 Data-type-generic programming | Omar - August 3 |
12.2.2 Example: Generating SQL queries | Omar - August 3 |
12.3 Template Haskell and quasiquotes | Jens - August 17 |
12.3.1 (2nd half - starting with Generating Declarations) | Jens - August 17 |
12.3.2 Example: Generating remote function calls (1st half - pp 421-426) | Omar - August 17 |
12.3.2 (2nd half - starting with Value Passing and Networking) | Omar - August 17 |
Chapter 11 June 30, 2022 | Presenter |
---|---|
11.1 Haskell types 101 | Casey - June 30 |
11.1.2 Delivering information with types | Casey - June 30 |
11.1.3 Type operators | Casey - July 13 |
11.2 Data kinds and type-level literals | Sergey - July 13 |
11.3 Computations over types with type families | Jens - July 13 |
11.3.3 Data families | Weining - July 13 |
11.4 Generalized algebraic data types (motivation) | Casey - July 13 |
11.3.2 Example: Avoid character escaping in GHCi | Jens - July 20 |
11.4.1 Example: Representing dynamically typed values with GADTs | Casey - July 20 |
11.5.1 Arbitrary-rank polymorphism | Omar - July 20 |
11.6 Advice on dealing with type errors | Sergey - July 27 |
Chapter 10 June 22, 2022 | Presenter |
---|---|
10.1 Benchmarking functions with criterion | Sergey |
10.1.2 Benchmarking an IPv4 filtering application | Antonio |
10.2 Profiling execution time and memory usage | Jens |
10.3 Tuning performance of the IPv4 filtering application | Weining |
Chapter 9 June 1, 2022 | Presenter |
---|---|
9.1 A mental model for Haskell memory usage at run time | Casey - June 1 |
9.1.2 Primitive unboxed data types | Casey - June 8 |
9.1.3 Representing data and code in memory with closures | Antonio - June 8 |
9.1.4 A detour: Lifted types and the concept of strictness | Antonio - June 8 |
9.2 Control over evaluation and memory usage | Weining - June 8 |
9.2.2 Defining data types with unboxed values | Casey - June 22 |
9.3 Exploring compiler optimizations by example | Jens - June 22 |
9.3.2 Looking at GHC Core | Jens - June 22 |
Chapter 8 May 25, 2022 | Presenter |
---|---|
8.1 Setting a scene: IPv4 Filtering application | Casey |
8.2 Testing the IPv4 filtering application 8.2.1 Overview of approaches to testing | Casey |
8.2.3 Specifications writing and checking with Hspec | Sergey |
8.2.4 Property-based testing with Hedgehog | Weining - May 25 / June 1 |
8.2.5 Golden tests with tasty-golden | Jens - June 1 |
8.3 Other approaches to testing 8.3.2 Lightweight verification with LiquidHaskell 8.3.3 Code quality with hlint | Jens - June 1 |
Chapter 7 May 4, 2022 | Presenter |
---|---|
7.1 Overview of error-handling mechanisms in Haskell | Weining |
7.2 Programmable exceptions in monad stacks | Jens |
7.3 GHC runtime exceptions | Sergey - May 18 |
7.3.3 Catching exceptions | Casey - May 18 |
7.4 Example: Accessing web APIs and GHC exceptions | Antonio- May 18 |
7.4.2 Exception-handling strategies | Jens - May 18 |
7.5 Logging | Weining - May 18 |
Homework for April 27:
question 1 - “Do you see which (<$>)
is applied in this implementation?" (p. 194, below implementation of instance Applicative m
)
question 2 - explain the case Just v
on the top of p. 195
(I see it now - Casey)
Chapter 6 April 13, 2022 | Presenter |
---|---|
Problem of combining monads | Casey |
6.1.2 Introducing monad transformers and monad stacks | Sergey |
IO-based monad transformer stacks 6.2.1 Describing a monad stack | Jens |
6.2.2 Exploiting monad stack functionality | Weining |
6.2.3 Running an application | Jens - April 20 |
What is a monad transformer? | Jens - April 20 |
6.3.3 Step 2: Implementing the full monad stack functionality | Weining - April 27 |
6.3.4 Step 3: Supplying additional functionality | Sergey - April 27 |
Monad transformers in the Haskell libraries | Casey - April 27 |
Chapter 5 March 16, 2022 | Presenter |
---|---|
Basic monads in use: Maybe, Reader, Writer | Sergey |
5.1.2 Carrying configuration all over the program with Reader | Casey |
5.1.3 Writing logs via Writer SQL GCD |
Carl Jens - April 6 |
Maintaining state via the State monad | Weining - March 23 |
5.2.2 Parsing arithmetic expressions with State | Jens - March 23 |
5.2.3 RWS monad to rule them all: The game of dice | Antonio - April 6 |
Other approaches to mutability | Sergey - April 6 |
5.3.2 Mutable references in the ST monad | Casey - April 6 |
Chapter 4 March 2, 2022 | Presenter |
---|---|
Organizing Haskell code with modules | Carl |
4.1.2 Custom preludes | Weining |
4.1.3 Example: containers-mini | Sergey |
Understanding Haskell packages 4.2.1 Packages at the GHC level | Jens |
4.2.2 Cabal packages and Hackage | Jens - March 9, 2022 |
Tools for project development | Casey - March 9, 2022 |
Note:
In Section 3.2.5, in order to get the added dependencies to work, try running cabal with the option --allow-newer for the base package. Also update the versions to match those in hid-examples.cabal cabal build --allow-newer=base
Chapter 3 February 16, 2022 | Presenter |
---|---|
Setting the scene | Weining |
Exploring design space | Jens |
Implementation details | Casey |
Implementation details | Karthik - February 23 |
Implementation details | Sergey - February 23 |
More in-depth discussions on libraries | |
(optional) time library |
|
(optional) blaze-html library | Casey - February 23 |
(optional) lucid library |
|
(optional) colonnade library |
|
(optional) Chart library |
|
(optional) cassava library | Carl - February 23 |
(optional) optparse-applicative library | Sergey - February 23 |
(optional) cmdargs library |
|
Chapter 2 January 26, 2022 | Presenter |
---|---|
Manipulating a radar antenna with type classes | Sergey |
Manipulating a radar antenna with type classes | Weining |
Issues with numbers and text | Jens - February 2 |
Abstracting computations with type classes | Karthik - February 2 |
Chapter 1 January 17, 2022 | Presenter |
---|---|
Solving problems in the GHCi REPL with functions | Casey |
From GHCi and String to GHC and Text | Casey |
Functional programs as sets of IO actions | Karthik |
Embracing pure functions | Jens |