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]
Versions [faq]
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 NixOS:
Downloads 50 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-09-05 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

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