| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sun, 18 Jan 2026 04:17:05 GMT
X-Served-By: cache-dfw-kdfw8210097-DFW, cache-bom-vanm7210021-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768709825.807101,VS0,VE557
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
hasql-simple: A somewhat opinionated "simpler" API to hasql
hasql-simple: A somewhat opinionated "simpler" API to hasql
Downloads
- hasql-simple-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0 |
|---|---|
| Dependencies | aeson (>=1.1), base (>=4.7 && <5), bytestring (>=0.10), contravariant (>=1.4), hasql, text (>=1.2), time (>=1.6), unordered-containers (>=0.2), vector (>=0.12) [details] |
| License | BSD-3-Clause |
| Copyright | 2017 Alexander Thiemann <mail@athiemann.net> |
| Author | Alexander Thiemann |
| Maintainer | mail@athiemann.net |
| Uploaded | by AlexanderThiemann at 2017-09-23T21:18:11Z |
| Category | Web |
| Home page | https://github.com/agrafix/hasql-simple#readme |
| Source repo | head: git clone https://github.com/agrafix/hasql-simple |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 1004 total (2 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2017-09-23 [all 1 reports] |
Readme for hasql-simple-0.1.0.0
[back to package description]hasql-simple
A somewhat opinionated "simpler" API to hasql. This allows to write code like:
import Hasql.Query
import Hasql.Simple
import qualified Hasql.Decoders as D
data NewUser
= NewUser
{ nu_username :: !T.Text
, nu_email :: !T.Text
, nu_password :: !(Password 'PtHash)
} deriving (Show)
createUserQ :: Query NewUser UserId
createUserQ =
statement sql encoder decoder True
where
sql =
"INSERT INTO login (username, email, password) VALUES ($1, $2, $3) RETURNING id;"
encoder =
req nu_username
<> req nu_email
<> req nu_password
decoder =
D.singleRow dbDecVal
The -simple in the name is due to this type class approach beeing similar to the one found in postgresql-simple. All contributions (e.g. more instances and/or helper functions) are welcome, please send a PR.