name:         huffman
version:      0.1
synopsis:     huffman
license:      BSD3

library:
  exposed-modules:
    - Huffman
    - Auxiliaries
  source-dirs: src
  dependencies:
    - base
    - containers
    - bytestring
    - binary
    - filepath

executables:
  huffman-exe:
    main: Main.hs
    source-dirs: exe
    dependencies:
      - base
      - huffman

tests:
  unit-tests:
    main: Tests.hs
    source-dirs: test
    dependencies:
      - base
      - HUnit
      - containers
      - huffman

ghc-options:
  - -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans
  - -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind
  - -fwarn-missing-signatures -fno-warn-partial-type-signatures
  - -Wredundant-constraints -rtsopts

default-extensions:
  - ScopedTypeVariables

# Setup for running tests in praktomat

flags:
  test-mode:
    description: "By default, do not run instructor tests"
    manual: true
    default: false

when:
- condition: flag(test-mode)
  then:
    dependencies:
      - template-haskell
      - haskell-src-meta
      - filepath
      - bytestring
      - directory
      - main-tester
  else:
    dependencies: []
