fizruk / fizruk/http-api-data

Converting a Haskell record to/from query params?

Open
#143 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
53
Forks
45
PR merge metrics
No merged PRs in 30d

Description

If I have the following Haskell type...

```haskell
data Args = Args
{ argLimit :: !Int
, argOffset :: !Int
, argSeaerch :: !Text
}
```

... is it possible to write `ToHttpApiData / FromHttpApiData` insances that can achieve the following conversion:

```
Args{argLimit=10, argOffset=0, argSearch="keyword"} <==> limit=10&offset=0&search=keyword
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.