Reference

IDE extensions

Source trax-hints/, rider-resharper/

Inlay hint extensions for VSCode and for Rider and ReSharper. Each shows a junction's TIn -> TOut after the chain call that names it.

protected override Task<Either<Exception, OrderReceipt>> Junctions() =>
    Chain<CheckInventoryJunction>()
        .Chain<ChargePaymentJunction>()      // InventoryResult -> PaymentConfirmation
        .Chain<CreateShipmentJunction>()     // PaymentConfirmation -> OrderReceipt
        .Resolve();
VSCodeRider / ReSharper
NameTrax.Core Chain Hints (trax-hints)Trax.Core Chain Hints
InstallVSCode MarketplaceJetBrains Marketplace, or build from source
Activates onC# filesC# files
Calls hinted.Chain<T>(), .ShortCircuit<T>() and .IChain<T>() written after a dot, with a non-generic type argumentEvery Chain, ShortCircuit and IChain invocation with a type argument
How types are foundThe editor's go-to-definition on the junction, reading the generic arguments of its class declarationThe semantic model, walking the junction's base types to IJunction<TIn, TOut>
SourceTrax.Core/plugins/vscode/trax-hintsTrax.Core/plugins/rider-resharper

A chain's first step, written without a leading dot (Chain<CheckInventoryJunction>() above), gets no hint in VSCode.

Types are resolved through the junction's base types, so these all show:

  • direct inheritance: class MyJunction : Junction<string, int>
  • primary constructors: class MyJunction(ILogger logger) : EffectJunction<string, int>
  • generic type arguments: EffectJunction<Unit, List<Manifest>>
  • tuples: EffectJunction<(List<A>, List<B>), List<C>>

Building the Rider plugin from source

cd Trax.Core/plugins/rider-resharper
./gradlew buildPlugin

The plugin is written to build/distributions/.