packages feed

json-autotype-1.0.13: json-autotype.cabal

-- Build information for the package.
name:                json-autotype
version:             1.0.13
synopsis:            Automatic type declaration for JSON input data
description:         Generates datatype declarations with Aeson's "FromJSON" instances
                     from a set of example ".json" files.
                     .
                     To get started you need to install the package,
                     and run "json-autotype" binary on an input ".json" file.
                     That will generate a new Aeson-based JSON parser.
                     .
                     "$ json-autotype input.json -o JSONTypes.hs"
                     .
                     Feel free to tweak the by changing types of the fields
                      - any field type that is instance of "FromJSON" should work.
                     .
                     You may immediately test the parser by calling it as a script:
                     .
                     "$ runghc JSONTypes.hs input.json"
                     .
                     One can now use multiple input files to generate better type description.
                     .
                     See introduction on  <https://github.com/mgajda/json-autotype>
                     for details.
homepage:            https://github.com/mgajda/json-autotype
license:             BSD3
license-file:        LICENSE
stability:           stable
author:              Michal J. Gajda
maintainer:          mjgajda@gmail.com
copyright:           Copyright by Michal J. Gajda '2014-'2015
category:            Data, Tools
build-type:          Simple
extra-source-files:  README.md changelog.md
cabal-version:       >=1.10
bug-reports:         https://github.com/mgajda/json-autotype/issues
tested-with:         GHC==7.8.4,GHC==7.10.3,GHC==7.6.3

source-repository head
  type:     git
  location: https://github.com/mgajda/json-autotype.git

library
  exposed-modules:     Data.Aeson.AutoType.Type
                       Data.Aeson.AutoType.Extract
                       Data.Aeson.AutoType.Format
                       Data.Aeson.AutoType.Pretty
                       Data.Aeson.AutoType.CodeGen
                       Data.Aeson.AutoType.Alternative
                       Data.Aeson.AutoType.Plugin.Subtype
                       Data.Aeson.AutoType.Plugin.Loader
  other-extensions:    TemplateHaskell,
                       ScopedTypeVariables,
                       OverloadedStrings,
                       FlexibleInstances,
                       MultiParamTypeClasses,
                       DeriveDataTypeable,
                       DeriveGeneric,
                       RecordWildCards
  other-modules:
                       -- internal module
                       Data.Aeson.AutoType.Util
  build-depends:       base                 >=4.3  && <4.10,
                       GenericPretty        >=1.2  && <1.3,
                       aeson                >=0.7  && <0.12,
                       bytestring           >=0.9  && <0.11,
                       containers           >=0.3  && <0.6,
                       filepath             >=1.3  && <1.5,
                       hashable             >=1.2  && <1.3,
                       hint                 >=0.4  && <0.6,
                       hflags               >=0.3  && <0.5,
                       lens                 >=4.1  && <4.14,
                       mmap                 >=0.5  && <0.6,
                       mtl                  >=2.1  && <2.3,
                       pretty               >=1.1  && <1.3,
                       process              >=1.1  && <1.5,
                       scientific           >=0.3  && <0.5,
                       text                 >=1.1  && <1.4,
                       uniplate             >=1.6  && <1.7,
                       unordered-containers >=0.2  && <0.3,
                       vector               >=0.9  && <0.12
  default-language:    Haskell2010

executable json-autotype
  main-is:             GenerateJSONParser.hs
  other-modules:       Data.Aeson.AutoType.Type
                       Data.Aeson.AutoType.Extract
                       Data.Aeson.AutoType.Format
                       Data.Aeson.AutoType.Pretty
                       Data.Aeson.AutoType.CodeGen
                       Data.Aeson.AutoType.Alternative
                       Data.Aeson.AutoType.Plugin.Subtype
                       Data.Aeson.AutoType.Plugin.Loader
                       Data.Aeson.AutoType.Util
  other-extensions:    TemplateHaskell,
                       ScopedTypeVariables,
                       OverloadedStrings,
                       FlexibleInstances,
                       MultiParamTypeClasses,
                       DeriveDataTypeable,
                       DeriveGeneric,
                       RecordWildCards
  build-depends:       base                 >=4.3  && <4.10,
                       GenericPretty        >=1.2  && <1.3,
                       aeson                >=0.7  && <0.12,
                       bytestring           >=0.9  && <0.11,
                       containers           >=0.3  && <0.6,
                       filepath             >=1.3  && <1.5,
                       hashable             >=1.2  && <1.3,
                       hint                 >=0.4  && <0.6,
                       hflags               >=0.3  && <0.5,
                       lens                 >=4.1  && <4.14,
                       mtl                  >=2.1  && <2.3,
                       pretty               >=1.1  && <1.3,
                       process              >=1.1  && <1.5,
                       scientific           >=0.3  && <0.5,
                       text                 >=1.1  && <1.4,
                       uniplate             >=1.6  && <1.7,
                       unordered-containers >=0.2  && <0.3,
                       vector               >=0.9  && <0.12
  -- hs-source-dirs:      
  default-language:    Haskell2010

-- * Test suites
-- Test suite with QuickCheck on random values,
-- and extracted types.
test-suite json-autotype-qc-test
  type:                exitcode-stdio-1.0
  main-is:             TestQC.hs
  other-modules:       Data.Aeson.AutoType.Util
                       Data.Aeson.AutoType.Extract
                       Data.Aeson.AutoType.Test
                       Data.Aeson.AutoType.Type
                       Data.Aeson.AutoType.Pretty
  other-extensions:    TemplateHaskell,
                       ScopedTypeVariables,
                       OverloadedStrings,
                       FlexibleInstances,
                       MultiParamTypeClasses,
                       DeriveDataTypeable,
                       DeriveGeneric,
                       RecordWildCards
  build-depends:       base                 >=4.3  && <4.10,
                       GenericPretty        >=1.2  && <1.3,
                       aeson                >=0.7  && <0.12,
                       bytestring           >=0.9  && <0.11,
                       containers           >=0.3  && <0.6,
                       directory            >=1.1  && <1.3,
                       filepath             >=1.3  && <1.5,
                       hashable             >=1.2  && <1.3,
                       lens                 >=4.1  && <4.14,
                       mtl                  >=2.1  && <2.3,
                       pretty               >=1.1  && <1.3,
                       process              >=1.1  && <1.5,
                       scientific           >=0.3  && <0.5,
                       smallcheck           >=1.0  && <1.2,
                       text                 >=1.1  && <1.4,
                       uniplate             >=1.6  && <1.7,
                       unordered-containers >=0.2  && <0.3,
                       vector               >=0.9  && <0.12,
                       QuickCheck           >=2.4  && <3.0
  -- hs-source-dirs:      
  default-language:    Haskell2010

-- Test suite with Haskell code generation and compilation
test-suite json-autotype-random-test
  type:                exitcode-stdio-1.0
  main-is:             GenerateTestJSON.hs
  other-modules:       Data.Aeson.AutoType.Util
                       Data.Aeson.AutoType.Pretty 
                       Data.Aeson.AutoType.Type   
                       Data.Aeson.AutoType.Extract
                       Data.Aeson.AutoType.Format 
                       Data.Aeson.AutoType.CodeGen
                       Data.Aeson.AutoType.Test   
  other-extensions:    TemplateHaskell,
                       ScopedTypeVariables,
                       OverloadedStrings,
                       FlexibleInstances,
                       MultiParamTypeClasses,
                       DeriveDataTypeable,
                       DeriveGeneric,
                       RecordWildCards
  build-depends:       base                 >=4.3  && <4.10,
                       GenericPretty        >=1.2  && <1.3,
                       aeson                >=0.7  && <0.12,
                       bytestring           >=0.9  && <0.11,
                       containers           >=0.3  && <0.6,
                       directory            >=1.1  && <1.3,
                       filepath             >=1.3  && <1.5,
                       hashable             >=1.2  && <1.3,
                       hflags               >=0.3  && <0.5,
                       lens                 >=4.1  && <4.14,
                       mtl                  >=2.1  && <2.3,
                       pretty               >=1.1  && <1.3,
                       process              >=1.1  && <1.5,
                       scientific           >=0.3  && <0.5,
                       smallcheck           >=1.0  && <1.2,
                       text                 >=1.1  && <1.4,
                       uniplate             >=1.6  && <1.7,
                       unordered-containers >=0.2  && <0.3,
                       vector               >=0.9  && <0.12,
                       QuickCheck           >=2.4  && <3.0
  -- hs-source-dirs:      
  default-language:    Haskell2010