Commit 8ec6c4d1 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢
Browse files

Split random-wta component into library and executable

This allows tests to depend on the library, leading to shorter compile times
cleaner boundaries.
parent b4dcc67c
Loading
Loading
Loading
Loading
+27 −18
Original line number Diff line number Diff line
@@ -292,10 +292,9 @@ executable random-dfa
  if !flag(benchmark-generators)
    buildable:       False
    
executable random-wta
  hs-source-dirs:      src/random-wta
  main-is:             Main.hs
  other-modules:       Types
library random-wta-lib
  hs-source-dirs:      src/random-wta/lib
  exposed-modules:     Types
                     , Generator
                     , Output
                     , Probability
@@ -308,17 +307,32 @@ executable random-wta
                     , FlexibleInstances
                     , FunctionalDependencies
  build-depends:       base >= 4.11
                     , optparse-applicative
                     , vector
                     , text
                     , vector >= 0.12 && <0.13
                     , text >= 1.2 && <1.3
                     , random >= 1.1 && <1.2
                     , mtl >= 2.2 && <2.3
                     , megaparsec >= 7 && <8
                     , scientific >= 0.3 && <0.4
                     , containers >= 0.6 && <0.7
  ghc-options:         -Wall -Wno-name-shadowing
  if !flag(benchmark-generators)
    buildable:       False

executable random-wta
  hs-source-dirs:      src/random-wta
  main-is:             Main.hs
  default-language:    Haskell2010
  default-extensions:  OverloadedStrings
  build-depends:       base >= 4.11
                     , random-wta-lib
                     , optparse-applicative
                     , prettyprinter >= 1.2.1
                     , prettyprinter-ansi-terminal >= 1.1.1.2
                     , prettyprinter-convert-ansi-wl-pprint
                     , vector >= 0.12 && <0.13
                     , text >= 1.2 && <1.3
                     , random >= 1.1 && <1.2
                     , megaparsec >= 7 && <8
  ghc-options:         -Wall -Wno-name-shadowing
  if !flag(benchmark-generators)
    buildable:       False
@@ -327,17 +341,12 @@ test-suite random-wta-tests
  type:                exitcode-stdio-1.0
  hs-source-dirs:      src/random-wta
  main-is:             Tests.hs
  other-modules:       Types
                     , IndexedTransition
                     , Generator
                     , Probability
  default-language:    Haskell2010
  build-depends:       base >= 4.11
                     , random-wta-lib
                     , vector >= 0.12 && <0.13
                     , random >= 1.1 && <1.2
                     , mtl >= 2.2 && <2.3
                     , scientific >= 0.3 && <0.4
                     , containers >= 0.6 && <0.7
                     , hspec
                     , QuickCheck
                     , hspec >= 2.6 && <2.8
                     , QuickCheck >= 2.12 && <2.14
  ghc-options:         -Wall -Wno-name-shadowing
  if !flag(benchmark-generators)
    buildable:       False
Loading