packages feed

hw-prelude-0.0.0.3: hw-prelude.cabal

cabal-version:          3.4
name:                   hw-prelude
version:                0.0.0.3
synopsis:               Opinionated prelude library
description:            Opinionated prelude library.
license:                Apache-2.0
license-file:           LICENSE
author:                 John Ky
maintainer:             newhoggy@gmail.com
copyright:              2024 John Ky
category:               Development
build-type:             Simple
extra-doc-files:        CHANGELOG.md
extra-source-files:     README.md

source-repository head
  type:                 git
  location:             https://github.com/haskell-works/hw-prelude

common base                       { build-depends: base                       >= 4.13       && < 5      }

common aeson                      { build-depends: aeson                                       < 2.3    }
common async                      { build-depends: async                                       < 2.3    }
common bytestring                 { build-depends: bytestring                                  < 0.13   }
common contravariant              { build-depends: contravariant                               < 1.6    }
common directory                  { build-depends: directory                                   < 1.4    }
common filepath                   { build-depends: filepath                                    < 1.6    }
common generic-lens               { build-depends: generic-lens                                < 2.3    }
common microlens                  { build-depends: microlens                                   < 0.5    }
common network                    { build-depends: network                                     < 3.3    }
common process                    { build-depends: process                                     < 1.7    }
common resourcet                  { build-depends: resourcet                                   < 1.4    }
common text                       { build-depends: text                                        < 3      }
common unliftio                   { build-depends: unliftio                                    < 0.3    }

common hw-prelude                 { build-depends: hw-prelude                                           }

common Win32
  if os(windows)
    build-depends:      Win32   >= 2.5.4.1 && < 3

flag werror
  description: Enable -Werror
  manual: True
  default: False

common project-config
  default-language:     Haskell2010
  default-extensions:   BlockArguments
                        DataKinds
                        DeriveGeneric
                        DuplicateRecordFields
                        FlexibleContexts
                        FlexibleInstances
                        LambdaCase
                        NoImplicitPrelude
                        OverloadedStrings
                        RankNTypes
                        ScopedTypeVariables
                        TypeApplications
                        TypeOperators
  ghc-options:          -Wall

  if flag(werror)
    ghc-options:        -Werror

library
  import:               base, project-config,
                        aeson,
                        async,
                        bytestring,
                        contravariant,
                        directory,
                        filepath,
                        generic-lens,
                        microlens,
                        network,
                        process,
                        resourcet,
                        text,
                        unliftio,
                        Win32,

  if os(windows)
    exposed-modules:    HaskellWorks.IO.Win32.NamedPipe

  exposed-modules:      HaskellWorks.Control.Monad
                        HaskellWorks.Data.String
                        HaskellWorks.Error
                        HaskellWorks.Error.Types
                        HaskellWorks.Error.Types.All
                        HaskellWorks.Error.Types.GenericError
                        HaskellWorks.Error.Types.TimedOut
                        HaskellWorks.IO.Network.NamedPipe
                        HaskellWorks.IO.Network.Port
                        HaskellWorks.IO.Network.Socket
                        HaskellWorks.IO.Process
                        HaskellWorks.Prelude
                        HaskellWorks.Unsafe
  hs-source-dirs:       src