Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alt-romes/cob-hs
https://github.com/alt-romes/cob-hs
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alt-romes/cob-hs
- Owner: alt-romes
- Created: 2022-01-17T12:13:59.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T22:26:08.000Z (about 1 year ago)
- Last Synced: 2024-10-30T03:21:50.488Z (2 months ago)
- Language: Haskell
- Size: 223 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# cob-hs
Add the following incantation to `cabal.project` while this isn't on hackage/for using HEAD
```hs
source-repository-package
type: git
location: https://github.com/alt-romes/cob-hs.git-- for cob-ui
source-repository-package
type: git
location: https://github.com/alt-romes/cob-hs.git
subdir: cob-ui
```
# InterfaceWe provide
* A way (TH) to automatically derive instances of `Record` for your native
Haskell datatypes, s.t. you can insert and query `RecordM` using your own
Haskell idiomatic datatypes -- conversions to the `RecordM` format are done
automatically behind the scenes.* A way to construct RecordM queries which takes care of some usual details by
reflecting on the types.* Two interfaces to Cob:
* One based on simple `mtl` constraints:
* With support for RecordM (`Cob.RecordM`)
* And UserM (`Cob.UserM`)
* And another, a `Cob` free monad, which is basically a Cob DSL. It features:
* An interpreter, `runCob`, which is implemented in terms of the first
interface, and will run the DSL programs in the Cob instance specified by
the `CobSession`
* And a /mock interpreter/, `mockCob`, which is also implemented in terms of
the first interface, and also runs the same DSL programs on the
specified Cob instance -- but, afterwards, deletes all records and userm
instances created.* Examples! See the `examples` directory.