packages feed

medea-1.1.1: medea.cabal

cabal-version:      2.2
name:               medea
version:            1.1.1
synopsis:           A schema language for JSON.
description:
  A reference implementation of a schema language, together with a conformance
  suite and a specification.

homepage:           https://github.com/juspay/medea
bug-reports:        https://github.com/juspay/medea/issues
license:            MIT
author:
  Koz Ross,
  Shaurya Gupta

maintainer:         koz.ross@retro-freedom.nz
copyright:          Juspay Technologies Pvt Ltd (C) 2020
category:           Data
build-type:         Simple
tested-with:        GHC ==8.6.5 || ==8.8.3 || ==8.10.1
extra-source-files:
  CHANGELOG.md
  README.md
  SPEC.md
  TUTORIAL.md
  conformance/parser/pass/*.medea
  conformance/parser/fail/*.medea
  conformance/schema-builder/pass/*.medea
  conformance/schema-builder/fail/*.medea
  conformance/validation/*.medea

source-repository head
  type:     git
  location: https://github.com/juspay/medea.git

common lang-common
  default-language: Haskell2010
  ghc-options:
    -Wall -Wcompat -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wredundant-constraints

common test-common
  ghc-options: -threaded -with-rtsopts=-N

library
  import:          lang-common
  exposed-modules: Data.Medea
  other-modules:
    Data.Medea.Analysis
    Data.Medea.JSONType
    Data.Medea.Loader
    Data.Medea.Parser.Primitive
    Data.Medea.Parser.Spec.Array
    Data.Medea.Parser.Spec.Object
    Data.Medea.Parser.Spec.Property
    Data.Medea.Parser.Spec.Schema
    Data.Medea.Parser.Spec.Schemata
    Data.Medea.Parser.Spec.String
    Data.Medea.Parser.Spec.Type
    Data.Medea.Parser.Types
    Data.Medea.Schema
    Data.Medea.ValidJSON

  build-depends:
    , aeson                 ^>=1.4.6.0
    , algebraic-graphs      ^>=0.5
    , base                  >=4.11.1   && <5
    , bytestring            ^>=0.10.8.2
    , containers            ^>=0.6.0.1
    , deepseq               ^>=1.4.4.0
    , free                  ^>=5.1.3
    , hashable              >=1.2.7.0  && <1.4.0.0
    , megaparsec            ^>=8.0.0
    , microlens-ghc         ^>=0.4.12
    , mtl                   ^>=2.2.2
    , nonempty-containers   ^>=0.3.3.0
    , parser-combinators    >=1.1.0    && <2.0.0
    , scientific            ^>=0.3.6.2
    , text                  ^>=1.2.3.1
    , unordered-containers  ^>=0.2.10.0
    , vector                ^>=0.12.0.3
    , vector-instances      ^>=3.4

  hs-source-dirs:  src

test-suite conformance-parser
  import:         lang-common, test-common
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  other-modules:  TestM
  build-depends:
    , base
    , directory  ^>=1.3.3.0
    , filepath   ^>=1.4.2.1
    , hspec      ^>=2.7.1
    , medea
    , mtl

  hs-source-dirs: test/parser test

test-suite conformance-schema-builder
  import:         lang-common, test-common
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  other-modules:  TestM
  build-depends:
    , base
    , directory  ^>=1.3.3.0
    , filepath   ^>=1.4.2.1
    , hspec      ^>=2.7.1
    , medea
    , mtl

  hs-source-dirs: test/schema-builder test

test-suite quickcheck-validator
  import:         lang-common, test-common
  type:           exitcode-stdio-1.0
  main-is:        Main.hs
  other-modules:
    Data.Aeson.Arbitrary
    TestM

  build-depends:
    , aeson
    , base
    , directory             ^>=1.3.3.0
    , filepath              ^>=1.4.2.1
    , hspec                 ^>=2.7.1
    , hspec-core            ^>=2.7.1
    , medea
    , mtl
    , QuickCheck            ^>=2.13.2
    , quickcheck-instances  ^>=0.3.22
    , text
    , unordered-containers  ^>=0.2.10.0
    , vector

  hs-source-dirs: test/validator-quickcheck test