cassava-embed-0.1.0.0: CSV-file embedding library

LicenseBSD-3
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Data.Csv.Embed

Description

cassava-embed helps to embed CSV-file using TemplateHaskell.

Typical usage:

print $(embedRecord (Proxy :: Proxy (String, Int)) "data.csv")

Synopsis

Documentation

embedRecords Source #

Arguments

:: (Lift a, FromRecord a) 
=> Proxy a

type of row (proxied)

-> FilePath

path to CSV-file

-> ExpQ 

Embeds CSV-file as list of values with type that implements FromRecord.

embedNamedRecords Source #

Arguments

:: (Lift a, FromNamedRecord a) 
=> Proxy a

type of row (proxied)

-> FilePath

path to CSV-file

-> ExpQ 

Embeds CSV-file as list of values with type that implements FromNamedRecord.