License | BSD-3 |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
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
:: (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
.
:: (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
.