cabal-version:  2.4
name:           aoc2021
version:        0.1.0.0
synopsis:       Development environment for Advent of Code challenges
description:    Scaffolding for an integrated development environment for Advent of Code
                challenges.  Includes auto-runner, prompt displays and countdowns, and
                integrated submissions.
category:       Web
homepage:       https://github.com/mstksg/advent-of-code-2021#readme
bug-reports:    https://github.com/mstksg/advent-of-code-2021/issues
author:         Justin Le
maintainer:     justin@jle.im
copyright:      (c) Justin Le 2021
license:        MIT
license-file:   LICENSE
build-type:     Simple
extra-source-files:
    README.md
    CHANGELOG.md

source-repository head
  type:                git
  location:            https://github.com/mstksg/advent-of-code-2021.git

common common-options
  build-depends:       advent-of-code-api >=0.2.7
                     , Cabal
                     , aeson
                     , ansi-terminal
                     , base >=4.7 && <5
                     , bitvec
                     , advent-of-code-ocr
                     , bytestring
                     , comonad
                     , conduino
                     , constraints
                     , constraints-extras
                     , containers
                     , criterion
                     , data-default-class
                     , data-fix
                     , data-interval
                     , data-memocombinators
                     , deepseq
                     , dependent-sum
                     , directory
                     , distributive
                     , dlist
                     , extended-reals
                     , fgl
                     , filepath
                     , fin
                     , finitary
                     , finite-typelits
                     , foldl
                     , ghc-typelits-natnormalise
                     , groups
                     , hashable
                     , haskeline
                     , haskell-names
                     , haskell-src-exts
                     , heredoc
                     , hpack
                     , lens
                     , linear
                     , megaparsec
                     , microlens-th
                     , monoid-extras
                     , mtl
                     , nonempty-containers
                     , pandoc
                     , parallel
                     , parser-combinators
                     , pointedlist
                     , profunctors
                     , psqueues
                     , recursion-schemes
                     , safe
                     , semialign
                     , semigroupoids
                     , split
                     , strict-tuple
                     , tagsoup
                     , template-haskell
                     , text
                     , th-abstraction
                     , these
                     , time
                     , transformers
                     , vector
                     , vector-algorithms
                     , vector-sized
                     , yaml

  ghc-options:         -Wall
                       -Wcompat
                       -Widentities
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wno-partial-type-signatures
  if impl(ghc >= 8.0)
    ghc-options:       -Wredundant-constraints
  if impl(ghc >= 8.2)
    ghc-options:       -fhide-source-paths
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
                       -Wpartial-fields
  if impl(ghc >= 8.8)
    ghc-options:       -Wmissing-deriving-strategies

  default-language:    Haskell2010
  default-extensions:
      AllowAmbiguousTypes
      ApplicativeDo
      BangPatterns
      BlockArguments
      DataKinds
      DeriveAnyClass
      DeriveFoldable
      DeriveFunctor
      DeriveGeneric
      DeriveTraversable
      DerivingStrategies
      DerivingVia
      EmptyCase
      FlexibleContexts
      FlexibleInstances
      FunctionalDependencies
      GADTs
      GeneralizedNewtypeDeriving
      ImplicitParams
      KindSignatures
      LambdaCase
      MonadComprehensions
      MultiParamTypeClasses
      MultiWayIf
      NumDecimals
      OverloadedLabels
      PartialTypeSignatures
      PatternGuards
      PatternSynonyms
      PolyKinds
      RankNTypes
      RecordWildCards
      ScopedTypeVariables
      StandaloneDeriving
      TemplateHaskell
      TupleSections
      TypeApplications
      TypeFamilies
      TypeInType
      TypeOperators
      UndecidableInstances
      ViewPatterns

library
  import:              common-options
  exposed-modules:
      AOC
      AOC.Challenge
      AOC.Challenge.Day01
      AOC.Challenge.Day02
      AOC.Challenge.Day03
      AOC.Challenge.Day04
      AOC.Challenge.Day05
      AOC.Challenge.Day06
      AOC.Challenge.Day07
      AOC.Challenge.Day08
      AOC.Challenge.Day09
      AOC.Challenge.Day10
      AOC.Challenge.Day11
      AOC.Challenge.Day12
      AOC.Challenge.Day13
      AOC.Challenge.Day14
      AOC.Challenge.Day15
      AOC.Challenge.Day16
      AOC.Challenge.Day17
      AOC.Challenge.Day18
      AOC.Challenge.Day19
      AOC.Challenge.Day20
      AOC.Challenge.Day21
      AOC.Challenge.Day22
      AOC.Challenge.Day23
      AOC.Challenge.Day24
      AOC.Challenge.Day25
      AOC.Common
      AOC.Common.FinitarySet
      AOC.Common.Point
      AOC.Common.Search
      AOC.Discover
      AOC.Prelude
      AOC.Run
      AOC.Run.Config
      AOC.Run.Interactive
      AOC.Run.Load
      AOC.Solver
      AOC.Util
      AOC.Util.DynoMap
  other-modules:
      Paths_aoc2021
  hs-source-dirs:
      src
  other-modules:
      Paths_aoc2021

executable aoc2021
  import: common-options
  main-is: aoc.hs
  hs-source-dirs:
      app
  build-depends:
      ansi-terminal
    , aoc2021
    , base >=4.7 && <5
    , containers
    , deepseq
    , finite-typelits
    , microlens
    , mtl
    , optparse-applicative
  default-language: Haskell2010
  ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2

test-suite aoc2021-test
  import: common-options
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  hs-source-dirs:
      test
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      ansi-terminal
    , aoc2021
    , base >=4.7 && <5
    , mtl
  default-language: Haskell2010

benchmark aoc2021-bench
  type: exitcode-stdio-1.0
  main-is: Bench.hs
  hs-source-dirs:
      bench
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      aoc2021
    , base >=4.7 && <5
    , mtl
  default-language: Haskell2010