cabal-version:      3.6
name:               advent-of-code22
version:            0.1.0.0

-- A short (one-line) description of the package.
synopsis: Solutions for the Advent of Code 2022

-- A longer description of the package.
-- description: 

-- A URL where users can report bugs.
-- bug-reports:

-- The license under which the package is released.
-- license:
author:             Neil Smith
maintainer:         NeilNjae@users.noreply.github.com

-- A copyright notice.
-- copyright:
-- category:
extra-source-files:
    CHANGELOG.md
    README.md

common common-extensions
  default-extensions:     AllowAmbiguousTypes
                        , ApplicativeDo
                        , BangPatterns
                        , BlockArguments
                        , DataKinds
                        , DeriveFoldable
                        , DeriveFunctor
                        , DeriveGeneric
                        , DeriveTraversable
                        -- , DuplicateRecordFields
                        , EmptyCase
                        , FlexibleContexts
                        , FlexibleInstances
                        , FunctionalDependencies
                        , GADTs
                        , GeneralizedNewtypeDeriving
                        , ImplicitParams
                        , KindSignatures
                        , LambdaCase
                        , MonadComprehensions
                        , MonoLocalBinds
                        , MultiParamTypeClasses
                        , MultiWayIf
                        , NamedFieldPuns
                        , NegativeLiterals
                        , NumDecimals
                        -- , NoFieldSelectors
                        -- , OverloadedLists
                        -- , OverloadedRecordDot
                        , OverloadedStrings
                        , PartialTypeSignatures
                        , PatternGuards
                        , PatternSynonyms
                        , PolyKinds
                        , RankNTypes
                        , RecordWildCards
                        , ScopedTypeVariables
                        , TemplateHaskell
                        , TransformListComp
                        , TupleSections
                        , TypeApplications
                        , TypeFamilies
                        , TypeInType
                        , TypeOperators
                        , ViewPatterns

common build-directives
  build-depends:       base >=4.16
  default-language:    Haskell2010
  ghc-options:         -O2 
                       -Wall 
                       -threaded 
                       -rtsopts "-with-rtsopts=-N"

executable advent-of-code22
    main-is:          Main.hs

    -- Modules included in this executable, other than Main.
    -- other-modules:

    -- LANGUAGE extensions used by modules in this package.
    -- other-extensions:
    build-depends:    base ^>=4.16.4.0
    hs-source-dirs:   app
    default-language: Haskell2010

executable advent01
  import: common-extensions, build-directives
  main-is: advent01/Main.hs
  build-depends: split

executable advent02
  import: common-extensions, build-directives
  main-is: advent02/Main.hs
  build-depends: text, attoparsec

executable advent03
  import: common-extensions, build-directives
  main-is: advent03/Main.hs
  build-depends: containers, split

executable advent04
  import: common-extensions, build-directives
  main-is: advent04/Main.hs
  build-depends: text, attoparsec

executable advent04i
  import: common-extensions, build-directives
  main-is: advent04/Main-interval.hs
  build-depends: text, attoparsec, intervals

executable advent05
  import: common-extensions, build-directives
  main-is: advent05/Main.hs
  build-depends: text, attoparsec, containers