Skip to content

Commit

Permalink
move files into more idiomatic packages and replaced cabal file with …
Browse files Browse the repository at this point in the history
…package.yaml
  • Loading branch information
awalterschulze committed Sep 10, 2018
1 parent e8c8e8a commit 18fe728
Show file tree
Hide file tree
Showing 35 changed files with 419 additions and 281 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The `Expr` library provides many useful helper functions:

```haskell
import Data.Numbers.Primes (isPrime)
import Expr
import Data.Katydid.Relapse.Expr

userLib :: String -> [AnyExpr] -> Either String AnyExpr
userLib "isPrime" args = mkIsPrime args
Expand Down
4 changes: 2 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Main where

import qualified Relapse
import qualified Json
import qualified Data.Katydid.Relapse.Relapse as Relapse
import qualified Data.Katydid.Parser.Json as Json

main :: IO ()
main = either
Expand Down
10 changes: 5 additions & 5 deletions bench/Suite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import Control.DeepSeq (NFData)
import GHC.Generics (Generic)
import Data.Int (Int64)

import qualified Ast
import Json (JsonTree, decodeJSON)
import Xml (decodeXML)
import qualified Parser
import Data.Katydid.Parser.Json (JsonTree, decodeJSON)
import Data.Katydid.Parser.Xml (decodeXML)

import qualified Relapse
import qualified Data.Katydid.Relapse.Ast as Ast
import qualified Data.Katydid.Relapse.Parser as Parser
import qualified Data.Katydid.Relapse.Relapse as Relapse

runBench :: BenchSuiteCase -> IO Int
runBench (BenchSuiteCase _ g (XMLDatas inputs)) =
Expand Down
16 changes: 12 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# 2.0.1
# 0.3.1.0

stopped using outdated EitherT internally

# 0.3.0.1

Smart constructors and user defined functions

# 0.2.0.1

Fixes parsing of builtin regex and contains functions.

# 2.0.0
# 0.2.0.0

Adds benchmarks

# 1.1.0
# 0.1.1.0

Cleanup

# 1.0.0
# 0.1.0.0

First version
276 changes: 158 additions & 118 deletions katydid.cabal
Original file line number Diff line number Diff line change
@@ -1,127 +1,167 @@
name: katydid
version: 0.3.1.0
synopsis: A haskell implementation of Katydid
description:
A haskell implementation of Katydid
.
This includes:
.
- Relapse, a validation Language
- Parsers for JSON, XML and an abstraction for trees
.
You should only need the following modules:
.
- The Relapse module is used for validation.
- The Json and XML modules are used to create Json and XML trees that can be validated.
.
If you want to implement your own parser then you can look at the Parsers module
.
-- This file has been generated from package.yaml by hpack version 0.28.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: eb9c235e419b3235c0c5d4afeb091cb0c185dc5894997b532fe20644255c1033

homepage: https://github.com/katydid/katydid-haskell
license: BSD3
license-file: LICENSE
author: Walter Schulze
maintainer: [email protected]
copyright: Walter Schulze
category: Data
build-type: Simple
extra-source-files: README.md, changelog.md
cabal-version: >=1.10
name: katydid
version: 0.4.0.1
synopsis: A haskell implementation of Katydid
description: Please see the README on GitHub at <https://github.com/katydid/katydid-haskell#readme>
category: Data
homepage: https://github.com/katydid/katydid-haskell#readme
bug-reports: https://github.com/katydid/katydid-haskell/issues
author: Walter Schulze
maintainer: [email protected]
copyright: Walter Schulze
license: BSD3
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
Changelog.md
LICENSE
Makefile
Readme.md

source-repository head
type: git
location: https://github.com/katydid/katydid-haskell

library
hs-source-dirs: src
exposed-modules: Ast
, Derive
, MemDerive
, Zip
, IfExprs
, Expr
, Exprs.Compare
, Exprs.Contains
, Exprs.Elem
, Exprs.Length
, Exprs.Logic
, Exprs.Strings
, Exprs.Type
, Exprs.Var
, Exprs
, Simplify
, Json
, Xml
, Parsers
, VpaDerive
, Parser
, Relapse
, Smart
build-depends: base >= 4.7 && < 5
, containers
, json
, hxt
, regex-tdfa
, mtl
, parsec
, deepseq
, text
, bytestring
, either
, extra
, ilist
, transformers
default-language: Haskell2010
exposed-modules:
Data.Katydid.Parser.Json
Data.Katydid.Parser.Parser
Data.Katydid.Parser.Xml
Data.Katydid.Relapse.Ast
Data.Katydid.Relapse.Derive
Data.Katydid.Relapse.Expr
Data.Katydid.Relapse.Exprs
Data.Katydid.Relapse.Exprs.Compare
Data.Katydid.Relapse.Exprs.Contains
Data.Katydid.Relapse.Exprs.Elem
Data.Katydid.Relapse.Exprs.Length
Data.Katydid.Relapse.Exprs.Logic
Data.Katydid.Relapse.Exprs.Strings
Data.Katydid.Relapse.Exprs.Type
Data.Katydid.Relapse.Exprs.Var
Data.Katydid.Relapse.IfExprs
Data.Katydid.Relapse.MemDerive
Data.Katydid.Relapse.Parser
Data.Katydid.Relapse.Relapse
Data.Katydid.Relapse.Simplify
Data.Katydid.Relapse.Smart
Data.Katydid.Relapse.VpaDerive
Data.Katydid.Relapse.Zip
other-modules:
Paths_katydid
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, bytestring
, containers
, deepseq
, either
, extra
, hxt
, ilist
, json
, mtl
, parsec
, regex-tdfa
, text
, transformers
default-language: Haskell2010

executable katydid-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, katydid
, mtl
default-language: Haskell2010
main-is: Main.hs
other-modules:
Paths_katydid
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, bytestring
, containers
, deepseq
, either
, extra
, hxt
, ilist
, json
, katydid
, mtl
, parsec
, regex-tdfa
, text
, transformers
default-language: Haskell2010

test-suite katydid-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, katydid
, directory
, filepath
, containers
, json
, hxt
, HUnit
, parsec
, mtl
, tasty-hunit
, tasty
, text
, primes
, ilist
other-modules: UserDefinedFuncs
, ParserSpec
, RelapseSpec
, Suite
, DeriveSpec
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
DeriveSpec
ParserSpec
RelapseSpec
Suite
UserDefinedFuncs
Paths_katydid
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
HUnit
, base >=4.7 && <5
, bytestring
, containers
, deepseq
, directory
, either
, extra
, filepath
, hxt
, ilist
, json
, katydid
, mtl
, parsec
, primes
, regex-tdfa
, tasty
, tasty-hunit
, text
, transformers
default-language: Haskell2010

benchmark criterion-benchmarks
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: Benchmarks.hs
build-depends: base
, katydid
, criterion >= 1.2.2
, directory
, filepath
, mtl
, hxt
, deepseq
, text
other-modules: Suite
ghc-options: -Wall
benchmark katydid-benchmark
type: exitcode-stdio-1.0
main-is: Benchmarks.hs
other-modules:
Suite
Paths_katydid
hs-source-dirs:
bench
ghc-options: -Wall
build-depends:
base >=4.7 && <5
, bytestring
, containers
, criterion >=1.2.2
, deepseq
, directory
, either
, extra
, filepath
, hxt
, ilist
, json
, katydid
, mtl
, parsec
, regex-tdfa
, text
, transformers
default-language: Haskell2010

source-repository head
type: git
location: https://github.com/katydid/katydid-haskell
Loading

0 comments on commit 18fe728

Please sign in to comment.