# polysemy-research/polysemy

:gemini: higher-order, no-boilerplate monads

Repository: https://github.com/polysemy-research/polysemy
Canonical: https://ross.abutalabs.com/products/polysemy
Language: Haskell
License: BSD-3-Clause
License Family: permissive
Last push: 2025-03-15T12:15:30+00:00

## Health v2 (maintenance only)
Score: 28/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 11, release rhythm 8, longevity 100
- inputs: {"age_days": 2758, "days_push": 536, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1072, forks 77 (observed 2026-08-28T04:03:28.328667+00:00)

## What it is
Polysemy is a Haskell library for building higher-order, low-boilerplate effect systems (extensible effects), letting you write domain-specific languages that separate business logic from implementation details. It composes better than mtl with no O(n^2) instances problem and supports multiple copies of the same effect.

## Use cases
- write effectful Haskell code without mtl boilerplate
- separate business logic from implementation details in Haskell
- define custom effects with minimal boilerplate
- use multiple instances of the same effect like two Reader environments
- model typed errors without ugly hacks
- write higher-order effects like bracket and local
- port code from transformers/mtl style to an effects system

## When to choose
- you're writing Haskell and want composable effects without functional dependencies
- you need multiple copies of the same effect in one stack
- you want to define new effects in a few lines and interpreters as plain functions
- you're tired of mtl's O(n^2) instances problem

## When to avoid
- you're not programming in Haskell
- you need maximum runtime performance, as polysemy's interpreter overhead can be significant
- your team already has a mature mtl or fused-effects codebase
- you want a library with a large ecosystem of prebuilt effects

## Facets
- artifact type: library
- maturity: stable
- function: programming-language, developer-tools
- domain: programming-languages, developer-tools
- platform: jvm
- tags: haskell, effects-system, monads, free-monads, extensible-effects, higher-order-effects, dsl, algorithms

## Member repositories
- polysemy-research/polysemy (main) score 28

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:28.328667+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:53:42.980645+00:00, confidence not recorded.
  - readme: https://github.com/polysemy-research/polysemy (fetched 2026-08-28T04:03:28.328667+00:00, sha aa3cf9b315cc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
