composite-xstep: ReaderT transformer pattern for higher kinded composite data.

[ data-structures, library, mit ] [ Propose Tags ]

ReaderT transformer pattern for higher kinded composite data.

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS]
Change log
Dependencies base (>=4.7 && <5), composite-base, vinyl [details]
License MIT
Copyright 2020 Daniel Firth
Author Daniel Firth
Category Data Structures
Source repo head: git clone
Uploaded by locallycompact at 2020-09-05T14:22:15Z
Distributions LTSHaskell:, NixOS:
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 337 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-09-05 [all 1 reports]

Readme for composite-xstep-

[back to package description]


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