composite-xstep

ReaderT transformer pattern for higher kinded composite data.

Stackage Nightly 2020-09-27:0.1.0.0
Latest on Hackage:0.1.0.0

See all snapshots composite-xstep appears in

MIT licensed by Daniel Firth

Module documentation for 0.1.0.0

This version can be pinned in stack with:composite-xstep-0.1.0.0@sha256:6773a65d69769f3b3dc27b5e33557e94f7b5b6d9c18641e2aaa7903a0dbc5137,1037

composite-xstep

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

Changes

Changelog for composite-xstep

(v0.1.0.0)

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