ReaderT transformer pattern for higher kinded composite data.

LTS Haskell 22.12:
Stackage Nightly 2023-12-26:
Latest on Hackage:

See all snapshots composite-xstep appears in

MIT licensed by Daniel Firth
Maintained by [email protected]
This version can be pinned in stack with:composite-xstep-,1037

Module documentation for


This package provides a specific XRec pattern for composite records, where the interpretation functor is isomorphic to ReaderT r m.

For example

import Path
import Composite.Record
import Composite.TH

withLensesAndProxies [d|
  type FPath          = "path"            :-> Path Rel File
  type FPath2         = "path2"           :-> Path Rel File

type A = '[FPath, FPath2]

foo :: MonadThrow m => XStep m FilePath A
foo =  parseRelDir
   ::& stripProperPrefix $(mkRelFile "foo") =<< parseRelDir
   ::& XRNil


Changelog for composite-xstep


  • Initial commit - Higher kinded ReaderT transformer pattern for composite records.