Skip to Content
Effective Haskell
book

Effective Haskell

by Rebecca Skinner
July 2023
Intermediate to advanced
670 pages
17h 13m
English
Pragmatic Bookshelf
Content preview from Effective Haskell

Chapter 6Type Classes

Earlier in this book, you learned about a type of polymorphism called parametric polymorphism that allows you to write a single implementation of a function that can work with many different types using type variables. This style of polymorphism is when you are concerned with data structures and the shape of the data you are working with, but don’t need to directly inspect values. Unfortunately, parametric polymorphism falls short when we need to deal with the polymorphic values in a non-generic way. As soon as we need to carry out specific operations on a polymorphic value, we run into the problem that our operations depend on what type the value happens to be.

Object-oriented programming languages let you solve this ...

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

Grokking Functional Programming

Grokking Functional Programming

Michal Plachta
Grokking Algorithms

Grokking Algorithms

Aditya Bhargava
The Rust Programming Language, 2nd Edition

The Rust Programming Language, 2nd Edition

Steve Klabnik, Carol Nichols

Publisher Resources

ISBN: 9798888650400Errata Page