← All stories
● Covered by 1 source · 1 reportMedium impact

Introduction to Actegories and Monoidal Categories

New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Actegories are pivotal in optics within programming.
  • Monoidal categories include a tensor product and associated constraints.
  • Haskell implementations exemplify these mathematical concepts.

Understanding Actegories

Actegories are an important concept in programming, specifically in optics, which includes lenses, prisms, and traversals. To effectively work with actegories, one must first grasp the concept of monoidal categories.

Definition of Monoidal Categories

A monoidal category incorporates a tensor product, which is a functor ensuring associativity and unitality up to isomorphism. It includes an invertible associator and unit object, alongside two unitors that are also invertible and natural.

Modeling Monoidal Categories in Haskell

In Haskell, monoidal categories can be parameterized by the type of the tensor product. The article presents a way to define a 'MonoidalCategory' type class that incorporates these structures, specifying how to work with types in a monoidal context.

Addressing Circularity in Type Constraints

A challenge arises when encoding units as associated types due to potential circular dependencies. This can be resolved using the 'UndecidableSuperClasses' pragma, allowing the specification of types while maintaining the required constraints.

Examples of Monoidal Categories

An example presented is the 'Hask' category, using cartesian products as the tensor. This implementation serves as a baseline to further explore categories within Haskell, showing the application of theoretical concepts in practical programming.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

This article introduces actegories, focusing on their role in optics and their definition through monoidal categories. It offers a Haskell implementation of monoidal categories, highlighting the notion of tensor products and constraints in type classes.