Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Everyday Extensions
Rating: 4.5 out of 5(1 rating)
2 students
Created bySerokell .
Last updated 2/2025
English

What you'll learn

  • Comprehensive understanding of Haskell extensions
  • Applications of Haskell extensions in various development scenarios
  • Ability to assess extension safety and necessity for a particular module
  • Best ways to integrate library dependencies into your projects
  • Practical skills in managing extensions with awareness

Course content

1 section8 lectures1h 6m total length
  • Commonly used extensions14:16

    In this lecture, we’re going to cover a few commonly used extensions. Contrary to the rest of the course, not all the extensions in this lecture are logically connected.

    We’re going to cover some deriving-related extensions and a couple of unrelated extensions, which are good to know and, personally speaking, some of my favorites.

  • Servant API10:49

    Servant is one of the libraries that Haskell developers use to write type-safe web applications.

    Servant provides an extensible type-level domain-specific language (DSL) for describing web APIs. A Servant API is just a Haskell type. It’s convenient and comes with a lot of benefits, for example, the compiler makes sure that the route implementation respects the route specification.

    This won’t be possible without extensions. They are required to use the type-level DSL and are recommended to make the code nicer.

  • Dealing with instance limitations6:22

    In this lecture, we are going to cover adding documentation and custom content types to Servant APIs.

  • Dealing with the type system10:24

    In this lecture, we are going to cover extensions that give us more control over polymorphic types.

  • Dealing with boilerplate10:37

    In this lecture, we’re going to deal with the boilerplate.

  • Generic lenses5:30

    In this lecture, we will focus on the generic-lens library, which uses GHC.Generics to derive efficient optics.

  • Dealing with records8:51

    In this lecture, we’re going to deal with records.

  • Bonus section0:04

    Free bonus from our experts:)

Requirements

  • Experience with Haskell is needed.

Description

Language extensions can be confusing. They change how the compiler works, add functionality, and change the syntax of the official Haskell specification, creating a bunch of possible ways to write Haskell. But changing the language is not as terrifying in practice. Most GHC extensions behave like switches: a feature could be either on or off.

The list of Haskell extensions is quite extensive and not easy to navigate:

  • Which extensions are common and safe to use?

  • Which extensions are considered harmful for production use?

  • Which extensions are required for the current module to compile and which ones were just copied from some other module?

Extensions in Haskell are unavoidable. There are extensions that some developers are addicted to and carry to all their projects. There are popular libraries that heavily rely on extensions and impose them upon their users.

This course is for people who want to understand extensions commonly seen in the wild. We will cover some commonly used extensions and look at a couple of Haskell libraries that can’t be used without extensions to get a practical understanding. By the end of the course, you won’t be blindly copying extensions from one module to another but will carry them along with awareness.

This course requires a basic understanding of Haskell syntax. You don’t need experience working with any of the libraries mentioned in the course.

Who this course is for:

  • Middle Haskell developers who want to know more about extensions.