Move tests to tests and exes to exe

Summary:
This works around https://github.com/haskell/cabal/issues/4350
If we don't do this files get compiled multiple times
and cabal is unhappy.

Reviewed By: patapizza

Differential Revision: D4782749

fbshipit-source-id: 5bbe425
This commit is contained in:
Bartosz Nitka 2017-03-27 15:49:18 -07:00 committed by Facebook Github Bot
parent 02e74cacd6
commit bd94622f64
139 changed files with 7 additions and 8 deletions

View File

@ -16,16 +16,11 @@ A Haskell environment is required. We recommend using
To compile and run the binary:
```
$ stack build
$ stack exec duckling-example-exec
$ stack exec duckling-example-exe
```
The first time you run it, it will download all required packages.
To run a source file directly (after compiling once):
```
$ stack ExampleMain.hs
```
See `ExampleMain.hs` for an example on how to integrate Duckling in your
See `exe/ExampleMain.hs` for an example on how to integrate Duckling in your
project.
## Supported dimensions
@ -50,7 +45,7 @@ Duckling supports many languages, but most don't support all dimensions yet
## Extending Duckling
To regenerate the classifiers and run the test suite:
```
$ stack RegenMain.hs && stack test
$ stack exec duckling-regen-exe && stack test
```
It's important to regenerate the classifiers after updating the code and before

View File

@ -454,6 +454,7 @@ library
test-suite duckling-test
type: exitcode-stdio-1.0
main-is: TestMain.hs
hs-source-dirs: tests
build-depends: duckling
, base >= 4.8.2 && < 5.0
, attoparsec >= 0.13.1.0 && < 0.14
@ -557,6 +558,7 @@ test-suite duckling-test
-- Ordinal
, Duckling.Ordinal.AR.Tests
, Duckling.Ordinal.DA.Tests
, Duckling.Ordinal.DE.Tests
, Duckling.Ordinal.EN.Tests
, Duckling.Ordinal.ET.Tests
@ -638,6 +640,7 @@ test-suite duckling-test
executable duckling-regen-exe
main-is: RegenMain.hs
hs-source-dirs: exe
ghc-options: -threaded -rtsopts -with-rtsopts=-N
other-modules: Duckling.Ranking.Train
, Duckling.Ranking.Generate
@ -664,6 +667,7 @@ executable duckling-regen-exe
executable duckling-example-exe
main-is: ExampleMain.hs
hs-source-dirs: exe
ghc-options: -threaded -rtsopts -with-rtsopts=-N
other-modules: Duckling.Data.TimeZone
build-depends: duckling

Some files were not shown because too many files have changed in this diff Show More