# Extension points — gcanti/fp-ts

> Canonical page: https://codevetter.com/unpack/fp-ts/extension-points

# Extension points — gcanti/fp-ts

Scanned commit c0a6472121c67a2b083e62fcff13e7d022e39d8f (2026-04-20). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Extension primarily happens through TypeScript interfaces and explicit instance arguments. New data types register with HKT dictionaries, then provide operations satisfying the relevant type classes. Existing factories accept caller-defined equality, ordering, error combination, and output accumulation policies. Maintainer tooling also exposes an injectable filesystem boundary and automatically derives packaged module entries from compiler output.
- A new data type can add a URI key through URItoKind module augmentation and supply Functor1-style instances; the HKT guide demonstrates this with Identity and explains the lookup mechanism. — [src/HKT.ts#L49-L70](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/HKT.ts#L49-L70) [docs/guides/HKT.md#L24-L42](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/docs/guides/HKT.md#L24-L42) [docs/guides/HKT.md#L58-L79](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/docs/guides/HKT.md#L58-L79)
- Type classes support multiple constructor arities and constrained variants; Functor2 keeps E generic, whereas Functor2C fixes E and includes an _E witness. — [src/Functor.ts#L25-L55](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/Functor.ts#L25-L55) [docs/guides/code-conventions.md#L52-L66](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/docs/guides/code-conventions.md#L52-L66)
- getApplicativeTaskValidation accepts a Task Apply instance and Semigroup<E>, allowing callers to choose execution policy and error concatenation instead of default first-error application. — [src/TaskEither.ts#L696-L705](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/TaskEither.ts#L696-L705) [src/TaskEither.ts#L667-L686](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/TaskEither.ts#L667-L686)
- Eq.fromEquals, Eq.struct, Eq.tuple, and Ord.fromCompare let consumers define domain comparison policies; ReadonlyMap.upsertAt then uses supplied key equality to preserve an existing equivalent key. — [src/Eq.ts#L38-L77](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/Eq.ts#L38-L77) [src/Ord.ts#L52-L55](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/Ord.ts#L52-L55) [src/ReadonlyMap.ts#L201-L218](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/ReadonlyMap.ts#L201-L218)
- ReadonlyArray.traverseWithIndex accepts an Applicative and combines results through of/map/ap; sequenceT and sequenceS similarly receive Apply instances, so their execution semantics come from the supplied dictionary. — [src/ReadonlyArray.ts#L1789-L1797](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/ReadonlyArray.ts#L1789-L1797) [src/Apply.ts#L588-L598](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/Apply.ts#L588-L598) [src/Apply.ts#L702-L713](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/Apply.ts#L702-L713)
- FromEither interfaces expose a lifting operation across HKT arities; chainOptionK combines that capability with Chain and an onNone callback to derive effect-specific Option sequencing. — [src/FromEither.ts#L33-L64](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/FromEither.ts#L33-L64) [src/FromEither.ts#L243-L250](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/FromEither.ts#L243-L250)
- Writer.getMonad receives a Monoid<W> and assembles Applicative/Chain behavior; getChain combines output from both stages using the caller's Semigroup.concat. — [src/Writer.ts#L160-L189](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/src/Writer.ts#L160-L189)
- Build computations receive a FileSystem environment that can be replaced structurally; module packaging derives names from dist/lib/*.js, excludes index, and writes per-module main/module/typings manifests. — [scripts/FileSystem.ts#L7-L14](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/scripts/FileSystem.ts#L7-L14) [scripts/build.ts#L11-L16](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/scripts/build.ts#L11-L16) [scripts/build.ts#L40-L76](https://github.com/gcanti/fp-ts/blob/c0a6472121c67a2b083e62fcff13e7d022e39d8f/scripts/build.ts#L40-L76)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
