Technical requirements
Support for lenses is not part of the Haskell standard library but needs to be installed as a separate package. Hackage features many lens packages. The most widely used and most feature-rich package is simply called lens
. Its enormous size and dependency on many other packages is sometimes a reason not to use it. For that reason, and to keep things accessible, I recommend starting with a smaller package that only provides the essential functionality of the lens
package: microlens
. This is the package we will be using in this chapter.