Hey! Hey! Can u rel8?
Go to file
Shane O'Brien 9105dbf67f
Add Encodable class for specifying what lit should do for a given type
This means that users defining new `DBType`s will have to additionally derive `Encodable` (but a simple `deriving Encodable` will suffice).

It also opens up the possibility of users defining non-`DBType`s that are `lit`able (and `select`able). For example, the `HKDT` helper makes allows arbitrary products of `DBType`s to be `lit`ed via `higgled`'s `HKD`:

```haskell
data S3Object = S3Object
  { bucketName :: Text
  , objectKey :: Text
  }
  deriving stock Generic
  deriving Encodable via HKDT S3Object
```

With the above loaded into GHCi:

```
>>> :t lit (S3Object mempty mempty)
lit (S3Object mempty mempty)
  :: HKD S3Object Expr
```

The implementation is extensible, allowing for the possibility of other "strategies" (in addition to `DBType` and `HKD`) in the future.
2021-06-16 14:04:35 +01:00
.github/workflows Update build.yaml 2021-04-08 13:01:16 +01:00
docs Rough documentation for constructing orderings 2021-04-24 22:30:13 +01:00
nix Upgrade Haskell.nix and remove data-serializer workaround 2021-04-10 13:46:32 +01:00
src Add Encodable class for specifying what lit should do for a given type 2021-06-16 14:04:35 +01:00
tests unnest support 2021-06-14 18:34:45 +01:00
.gitignore The beginning of rel8 1.0 2021-03-23 13:34:02 +00:00
cabal.project Add allow-newer: Cabal for entropy 2021-04-02 18:03:18 +01:00
cabal.project.haskell-nix Sketch of HKD-lifting of Generic types 2021-04-16 15:17:39 +01:00
default.nix Sketch of HKD-lifting of Generic types 2021-04-16 15:17:39 +01:00
LICENSE The beginning of rel8 1.0 2021-03-23 13:34:02 +00:00
README.md Create README.md 2021-04-02 17:43:15 +01:00
rel8.cabal Add Encodable class for specifying what lit should do for a given type 2021-06-16 14:04:35 +01:00
shell.nix GHC 9 support 2021-04-07 14:58:33 +01:00

Welcome!

Welcome to Rel8! Rel8 is a Haskell library for interacting with PostgreSQL databases, built on top of the fantastic Opaleye library.

The main objectives of Rel8 are:

  • Conciseness: Users using Rel8 should not need to write boiler-plate code. By using expressive types, we can provide sufficient information for the compiler to infer code whenever possible.

  • Inferrable: Despite using a lot of type level magic, Rel8 aims to have excellent and predictable type inference.

  • Familiar: writing Rel8 queries should feel like normal Haskell programming.

For more details, check out the official documentation.