packages feed

okf-core-0.10.0.0: okf-core.cabal

cabal-version: 3.4
name: okf-core
version: 0.10.0.0
synopsis:
  Read, validate, index, and traverse Open Knowledge Format bundles

description:
  okf-core parses Open Knowledge Format (OKF) bundles -- plain
  Markdown-plus-YAML knowledge graphs -- into typed documents, builds a concept
  index and link graph, validates referential integrity, and writes bundles back
  out with a round-trip guarantee.

category: Data, Text
license: BSD-3-Clause
license-file: LICENSE
author: Nadeem Bitar
maintainer: nadeem@gmail.com
copyright: (c) 2026 Nadeem Bitar
build-type: Simple
extra-doc-files: CHANGELOG.md
-- The canonical profile schema, plus the fixtures okf-core-test reads. The
-- fixture descriptors import the schema through ../../../dhall, so both trees
-- must ship for `cabal test` to work from the sdist.
-- The .py and .sql files are not a mistake: the dangling-frontmatter-path and
-- attested-computation fixtures need non-Markdown files in the bundle, because
-- resolving a path to one is the whole point of the checks they exercise.
extra-source-files:
  dhall/**/*.dhall
  test/fixtures/**/*.dhall
  test/fixtures/**/*.md
  test/fixtures/**/*.py
  test/fixtures/**/*.sql
  test/fixtures/**/*.txt

common common-options
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-uni-patterns
    -Wincomplete-record-updates
    -Wredundant-constraints
    -fhide-source-paths
    -Wmissing-export-lists
    -Wpartial-fields
    -Wmissing-deriving-strategies

  default-language: GHC2024
  default-extensions:
    DeriveAnyClass
    DuplicateRecordFields
    OverloadedLabels
    OverloadedStrings

library
  import: common-options
  hs-source-dirs: src
  exposed-modules:
    Okf.Actor
    Okf.Bundle
    Okf.ConceptId
    Okf.Discovery
    Okf.Document
    Okf.Graph
    Okf.Index
    Okf.Log
    Okf.Markdown
    Okf.Path
    Okf.Prelude
    Okf.Profile
    Okf.Profile.Bootstrap
    Okf.Profile.Discovery
    Okf.Profile.Documentation
    Okf.Profile.Registry
    Okf.Query
    Okf.Trust
    Okf.Validation

  build-depends:
    aeson >=2.2 && <2.4,
    attoparsec >=0.14 && <0.15,
    base >=4.20 && <5,
    bytestring >=0.11 && <0.13,
    cmark-gfm ^>=0.2,
    containers >=0.6 && <0.8,
    dhall >=1.41 && <1.43,
    directory >=1.3 && <1.4,
    filepath >=1.4 && <1.6,
    frontmatter >=0.1 && <0.2,
    generic-lens >=2.2 && <2.4,
    lens ^>=5.3,
    network-uri >=2.6.4 && <2.7,
    regex-tdfa >=1.3.2 && <1.4,
    scientific >=0.3 && <0.4,
    text ^>=2.1,
    time >=1.12 && <1.15,
    vector >=0.13 && <0.14,
    yaml >=0.11 && <0.12,

test-suite okf-core-test
  import: common-options
  type: exitcode-stdio-1.0
  main-is: Main.hs
  hs-source-dirs: test
  build-depends:
    aeson,
    base >=4.20 && <5,
    containers >=0.6 && <0.8,
    dhall >=1.41 && <1.43,
    directory,
    filepath,
    generic-lens >=2.2 && <2.4,
    lens ^>=5.3,
    okf-core,
    temporary,
    text ^>=2.1,
    time >=1.12 && <1.15,