| License | BSD-3 |
|---|---|
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Csv.Embed
Description
cassava-embed helps to embed CSV-file using TemplateHaskell.
Typical usage:
print $(embedRecord (Proxy :: Proxy (String, Int)) "data.csv")
- embedRecords :: (Lift a, FromRecord a) => Proxy a -> FilePath -> ExpQ
- embedNamedRecords :: (Lift a, FromNamedRecord a) => Proxy a -> FilePath -> ExpQ
Documentation
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.
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.