Skip to content

Commit

Permalink
Reorganize delta-table.cabal
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichApfelmus committed Jul 15, 2024
1 parent 8067a2d commit 4c6ade6
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 957 deletions.
12 changes: 0 additions & 12 deletions lib/delta-table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,3 @@ The main modules are:

* [Data.Table](src/Data/Table.hs) — database
* Contains the `Table` dataype, which models a table as you would find it in a database.
* [Data.Chain](src/Data/Delta.hs) — (block)chain
* Contains the `Chain` datatype, which is more specific
to the problem domain of storing a linear sequence
of checkpoints. Useful in a blockchain setting.

In addition, this package contains
* [Database.Persist.Delta](src/Database/Persist/Delta.hs) — database
* Implements a `Store` in an SQLite database for the `Entity` types in the `persistent` package.
* Implements a `Store` using raw SQL commands.
* [Database.Schema](src/Database/Schema.hs) — database
* Contains the `IsRow` type class for typed database rows, very similar to the style of the [servant](https://hackage.haskell.org/package/servant) package.
* Example: `type PersonRow = Table "person" :. Col "name" Text :. Col "birth" Int :. Col "id" Primary`.
97 changes: 46 additions & 51 deletions lib/delta-table/delta-table.cabal
Original file line number Diff line number Diff line change
@@ -1,36 +1,49 @@
name: delta-table
version: 0.2024.7.7
synopsis: Work with database tables using delta encodings.
homepage: https://github.com/cardano-foundation/cardano-wallet
author: Cardano Foundation (High Assurance Lab)
maintainer: hal@cardanofoundation.org
copyright: 2023 IOHK
license: Apache-2.0
category: Web
build-type: Simple
cabal-version: >=1.10
cabal-version: 3.6
build-type: Simple
name: delta-table
version: 0.2024.5.5
synopsis: Work with database tables using delta types.
description: Please see README.md
homepage: https://github.com/cardano-foundation/cardano-wallet
license: Apache-2.0
author: Cardano Foundation (High Assurance Lab)
maintainer: hal@cardanofoundation.org
copyright: 2023-2024 Cardano Foundation
category: Database

flag release
description: Enable optimization and `-Werror`
default: False
manual: True
extra-source-files:
README.md

library
common language
default-language:
Haskell2010
Haskell2010
default-extensions:
NoImplicitPrelude
OverloadedStrings
NoImplicitPrelude
OverloadedStrings

common opts-lib
ghc-options:
-Wall
-Wcompat
-fwarn-redundant-constraints
if (flag(release))
ghc-options:
-Werror
-Wall -Wcompat
-Wredundant-constraints
-Wincomplete-uni-patterns -Wincomplete-record-updates

if flag(release)
ghc-options: -O2 -Werror

common opts-exe
import: opts-lib
ghc-options: -threaded -rtsopts

flag release
description: Enable optimization and `-Werror`
default: False
manual: True

library
import: language, opts-lib
hs-source-dirs: src
build-depends:
base
, conduit
, containers
, delta-store
, delta-types
Expand All @@ -39,41 +52,23 @@ library
, io-classes
, monad-logger
, persistent
, persistent-sqlite
, say
, semigroupoids
, stm
, text
, transformers
hs-source-dirs:
src
exposed-modules:
Data.Chain
Data.Table
Database.Persist.Delta
Database.Schema
other-modules:
Demo.Database
Demo.TableOld

test-suite unit
default-language:
Haskell2010
default-extensions:
NoImplicitPrelude
OverloadedStrings
ghc-options:
-threaded -rtsopts
-Wall
if (flag(release))
ghc-options: -O2 -Werror
import: language, opts-exe
type: exitcode-stdio-1.0
hs-source-dirs: test/unit
main-is: Main.hs
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
base
, hspec
build-tool-depends:
hspec-discover:hspec-discover
type:
exitcode-stdio-1.0
hs-source-dirs:
test/unit
main-is:
Main.hs
Loading

0 comments on commit 4c6ade6

Please sign in to comment.