cabal-version: 1.12

name:           wikimusic-api
version:        1.1.0.1
description:    Please see the README at <https://gitlab.com/jjba-projects/wikimusic-api>
homepage:       https://gitlab.com/jjba-projects/wikimusic-api
bug-reports:    https://gitlab.com/jjba-projects/wikimusic-api/-/issues
author:         Josep Bigorra
maintainer:     Josep Bigorra <jjbigorra@gmail.com>
copyright:      2023 Josep Bigorra
license:        GPL-3
build-type:     Simple
                
extra-source-files:
    README.org
    CHANGELOG.org

source-repository head
  type: git
  location: https://gitlab.com/jjba-projects/wikimusic-api
  subdir: wikimusic-api

library
  exposed-modules:
      -- λ main
      WikiMusic.Config
      WikiMusic.Boot
      
      -- λ servant
      WikiMusic.Servant.ApiSetup
      WikiMusic.Servant.ArtistRoutes
      WikiMusic.Servant.AuthRoutes
      WikiMusic.Servant.GenreRoutes
      WikiMusic.Servant.SongRoutes
      WikiMusic.Servant.UserRoutes
      WikiMusic.Servant.Utilities
      
      -- λ interactions with wikimusic's system
      WikiMusic.Interaction.Artist
      WikiMusic.Interaction.Auth
      WikiMusic.Interaction.User
      WikiMusic.Interaction.Genre
      WikiMusic.Interaction.Mail
      WikiMusic.Interaction.Song

      -- λ free monadic definition of wikimusic's system and possible interactions
      WikiMusic.Free.ArtistCommand
      WikiMusic.Free.ArtistQuery
      WikiMusic.Free.AuthQuery
      WikiMusic.Free.GenreCommand
      WikiMusic.Free.GenreQuery      
      WikiMusic.Free.SongCommand
      WikiMusic.Free.SongQuery
      WikiMusic.Free.UserCommand
      WikiMusic.Free.MailCommand      
      WikiMusic.Free.UserQuery
      WikiMusic.Free.Clock
      WikiMusic.Free.Logger

      WikiMusic.Model.Config
      WikiMusic.Model.Env

      -- λ postgresql implementations
      WikiMusic.PostgreSQL.ArtistCommand
      WikiMusic.PostgreSQL.ArtistQuery
      WikiMusic.PostgreSQL.AuthQuery
      WikiMusic.PostgreSQL.GenreCommand
      WikiMusic.PostgreSQL.GenreQuery
      WikiMusic.PostgreSQL.Migration
      WikiMusic.PostgreSQL.WriteAbstraction
      WikiMusic.PostgreSQL.ReadAbstraction
      WikiMusic.PostgreSQL.SongCommand
      WikiMusic.PostgreSQL.SongQuery
      WikiMusic.PostgreSQL.UserQuery
      WikiMusic.PostgreSQL.UserCommand
      
      -- λ postgresql data models            
      WikiMusic.PostgreSQL.Model.Artist
      WikiMusic.PostgreSQL.Model.Genre
      WikiMusic.PostgreSQL.Model.Other
      WikiMusic.PostgreSQL.Model.Song

      -- λ clock
      WikiMusic.Clock.LiveClock

      -- λ logging
      WikiMusic.Console.Logger

      -- λ mail
      WikiMusic.SMTP.MailCommandSES

      -- λ custom prelude
      WikiMusic.Protolude
      
  other-modules:
      Paths_wikimusic_api
  hs-source-dirs:
      src
  ghc-options: -Wall -threaded
  default-extensions:
      DataKinds
      DefaultSignatures
      DuplicateRecordFields
      EmptyDataDecls
      ExistentialQuantification
      FlexibleContexts
      FlexibleInstances
      FunctionalDependencies
      GADTs
      InstanceSigs
      KindSignatures
      LambdaCase
      MultiWayIf
      NamedFieldPuns
      NoImplicitPrelude
      OverloadedStrings
      PartialTypeSignatures
      RecordWildCards
      TypeFamilies
      ViewPatterns

  build-depends:
      aeson
    , async
    , base < 5
    , bytestring
    , contravariant-extras
    , postgresql-libpq
    , hasql
    , hasql-implicits
    , hasql-migration
    , hasql-optparse-applicative
    , hasql-pool
    , hasql-transaction
    , hedis
    , keuringsdienst
    , keys
    , mtl
    , openapi3
    , optics
    , optparse-applicative
    , password
    , password-types
    , relude
    , time
    , servant
    , servant-openapi3
    , servant-rate-limit
    , servant-server
    , text
    , containers
    , filepath
    , directory
    , uuid
    , vector
    , wai
    , wai-cors
    , wai-extra
    , wai-rate-limit
    , wai-rate-limit-redis
    , warp
    , smtp-mail
    , mime-mail
    , base64-bytestring
    , neat-interpolation
    , HTTP
    , free-alacarte
    , tomland
    , wikimusic-model-hs
    , wikimusic-api-spec
  default-language: GHC2021

executable wikimusic-api-exe
  main-is: Main.hs
  other-modules:
      Paths_wikimusic_api
  hs-source-dirs:
      app
  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
  default-extensions:
      DataKinds
      DefaultSignatures
      DuplicateRecordFields
      EmptyDataDecls
      ExistentialQuantification
      FlexibleContexts
      FlexibleInstances
      FunctionalDependencies
      GADTs
      InstanceSigs
      KindSignatures
      LambdaCase
      MultiWayIf
      NamedFieldPuns
      NoImplicitPrelude
      OverloadedStrings
      PartialTypeSignatures
      RecordWildCards
      TypeFamilies
      ViewPatterns

  build-depends:
    base
    , wikimusic-api
  default-language: GHC2021

test-suite spec
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      Paths_wikimusic_api
  hs-source-dirs:
      test
  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
  default-extensions:
      DataKinds
      DefaultSignatures
      DuplicateRecordFields
      EmptyDataDecls
      ExistentialQuantification
      FlexibleContexts
      FlexibleInstances
      FunctionalDependencies
      GADTs
      InstanceSigs
      KindSignatures
      LambdaCase
      MultiWayIf
      NamedFieldPuns
      NoImplicitPrelude
      OverloadedStrings
      PartialTypeSignatures
      RecordWildCards
      TypeFamilies
      ViewPatterns

  build-depends:
    wikimusic-api
    , base
    , tasty
    , tasty-hunit
  default-language: GHC2021
