packages feed

json-spec-elm-0.4.0.5: json-spec-elm.cabal

cabal-version:       3.0
name:                json-spec-elm
version:             0.4.0.5
synopsis:            Elm code generate for `json-spec`.
description:         
                     Produce elm types, encoders, and decoders from a
                     [`json-spec`](https://hackage.haskell.org/package/json-spec) `Specification`.

                     See `/test/test.hs` for an example.
homepage:            https://github.com/owensmurray/json-spec-elm
license:             MIT
license-file:        LICENSE
author:              Rick Owens
maintainer:          rick@owensmurray.com
copyright:           2024 Rick Owens
category:            JSON, Elm
build-type:          Simple
extra-source-files:
  README.md
  LICENSE

common dependencies
  build-depends:
    , base                 >= 4.17.2.1 && < 4.21
    , containers           >= 0.6.7    && < 0.8
    , elm-syntax           >= 0.3.2.0  && < 0.4
    , json-spec            >= 0.3.0.0  && < 1.2
    , text                 >= 2.0.2    && < 2.2

common warnings
  ghc-options:
    -Wall
    -Wmissing-deriving-strategies
    -Wmissing-export-lists
    -Wmissing-import-lists
    -Wredundant-constraints

library
  import: dependencies, warnings
  exposed-modules:     
    Data.JsonSpec.Elm
  -- other-modules:       
  -- other-extensions:    
  hs-source-dirs:      src
  default-language:    Haskell2010
  ghc-options:
    -Wunused-packages
  build-depends:
    , bound                >= 2.0.7 && < 2.1
    , mtl                  >= 2.2.2 && < 2.4

flag compile-elm
  description:
    Set this flag to run the Elm compilation tests, which requires Elm
    to be installed on the system.
  default: False

test-suite compile-elm
  import: dependencies, warnings
  hs-source-dirs: test
  default-language: Haskell2010
  if flag(compile-elm)
    type: exitcode-stdio-1.0
    main-is: test.hs
    build-depends:
      , json-spec-elm
      , directory            >= 1.3.7.1  && < 1.4
      , hspec                >= 2.11.1   && < 2.12
      , prettyprinter        >= 1.7.1    && < 1.8
      , process              >= 1.6.16.0 && < 1.7
      , unordered-containers >= 0.2.19.1 && < 0.3
  else
    type: exitcode-stdio-1.0
    main-is: test-pass.hs