composite-cassava: Csv parsing functionality for composite.

[ composite, csv, library, mit ] [ Propose Tags ]

Csv parsing functionality for composite.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1.0, 0.0.2.0, 0.0.3.0, 0.0.3.1
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), cassava (>=0.5.0.0 && <0.6), composite-base (>=0.7.0.0 && <0.8), text, unordered-containers, vector [details]
License MIT
Copyright Daniel Firth
Author Daniel Firth
Maintainer dan.firth@homotopic.tech
Category Composite, Csv
Source repo head: git clone https://gitlab.homotopic.tech/haskell/composite-cassava
Uploaded by locallycompact at 2021-09-01T12:07:02Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 474 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-09-01 [all 1 reports]

Readme for composite-cassava-0.0.3.1

[back to package description]

composite-cassava

Provides FromNamedRecord and ToNamedRecord instances for composite records.

In order to use this, use DerivingVia with one of the newtypes, depending on your use case. The recommended way is like so:

withLensesAndProxies
  [d|
    type A = "A" :-> Text

    type B = "B" :-> Double

    type C = "C" :-> Text

    type D = "D" :-> Int
    |]

type RecMaybe = Rec Maybe '[A, B, C, D]

deriving newtype instance FromField A

deriving newtype instance FromField B

deriving newtype instance FromField C

deriving newtype instance FromField D

deriving newtype instance ToField A

deriving newtype instance ToField B

deriving newtype instance ToField C

deriving newtype instance ToField D

deriving via (TF Maybe '[A, B, C, D]) instance FromNamedRecord RecMaybe

deriving via (TF Maybe '[A, B, C, D]) instance ToNamedRecord RecMaybe