Type Classes

Type Classes

Problems with products, part one

Posing a difficulty with composition

Chris Martin's avatar
Chris Martin
Nov 17, 2022
∙ Paid

Where we see a type parameter to the right of a function arrow (or with no arrow at all, since a is isomorphic to () -> a), we have a covariant functor (or simply, "functor").

newtype Decode k v a = Decode{ decode :: Map k v -> a }

Covariant functors quite often admit an applicative aspect that allows us to build up larger stuff within the type parameter.

…

Keep reading with a 7-day free trial

Subscribe to Type Classes to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Mission Valley Software LLC · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture