packages feed

mysql-haskell-1.4.1: mysql-haskell.cabal

cabal-version:      3.4
name:               mysql-haskell
version:            1.4.1
synopsis:           pure haskell MySQL driver
description:        pure haskell MySQL driver.
license:            BSD-3-Clause
license-file:       LICENSE
author:             winterland1989
maintainer:         hi@jappie.me
copyright:          (c) 2016 Winterland
category:           Database
build-type:         Simple
extra-doc-files:    ChangeLog.md
-- mozillaCAStorePath reads the bundle through getDataFileName, which only
-- finds files cabal installs: data-files, not extra-source-files.
data-files:         mozillaCAStore.pem
extra-source-files:
  README.md
  test/cert/ca-key.pem
  test/cert/ca.pem
  test/cert/server-cert.pem
  test/cert/server-key.pem
  test/cert/server-req.pem
  test/json-data/buffer-builder.json
  test/json-data/dates-fract.json
  test/json-data/dates.json
  test/json-data/example.json
  test/json-data/geometry.json
  test/json-data/integers.json
  test/json-data/jp10.json
  test/json-data/jp100.json
  test/json-data/jp50.json
  test/json-data/numbers.json
  test/json-data/twitter1.json
  test/json-data/twitter10.json
  test/json-data/twitter100.json
  test/json-data/twitter20.json
  test/json-data/twitter50.json

homepage:           https://github.com/winterland1989/mysql-haskell
bug-reports:        https://github.com/winterland1989/mysql-haskell/issues

source-repository head
  type:     git
  location: https://github.com/winterland1989/mysql-haskell

common common-options
  ghc-options:
    -Wall -Wincomplete-uni-patterns
    -Wincomplete-record-updates -Widentities -Wredundant-constraints
    -Wcpp-undef -fwarn-tabs -Wpartial-fields
    -Wunused-packages
    -fenable-th-splice-warnings
    -fno-omit-yields
  build-depends:
      base >=4.9.1.0 && <4.22.0
  default-language: GHC2021

library
  import: common-options
  exposed-modules:
    Data.Binary.Parser
    Data.Binary.Parser.Numeric
    Data.Binary.Parser.Word8
    Data.Connection
    Data.Int.Int24
    Data.TLSSetting
    Data.Word.Word24
    Database.MariaDB
    Database.MySQL.Base
    Database.MySQL.BinLog
    Database.MySQL.BinLogProtocol.BinLogEvent
    Database.MySQL.BinLogProtocol.BinLogMeta
    Database.MySQL.BinLogProtocol.BinLogValue
    Database.MySQL.Connection
    Database.MySQL.Decoder
    Database.MySQL.Field
    Database.MySQL.Protocol.Auth
    Database.MySQL.Protocol.ColumnDef
    Database.MySQL.Protocol.Command
    Database.MySQL.Protocol.Escape
    Database.MySQL.Protocol.FloatingPoint
    Database.MySQL.Protocol.MySQLValue
    Database.MySQL.Protocol.Packet
    Database.MySQL.Protocol.RawRow
    Database.MySQL.TLS
    System.IO.Streams.TCP
    System.IO.Streams.TLS

  other-modules:      Paths_mysql_haskell
  autogen-modules:    Paths_mysql_haskell
  hs-source-dirs:     src
  other-modules:      Database.MySQL.Query
  build-depends:
    asn1-encoding >=0.9 && <0.10,
    asn1-types >=0.3 && <0.4,
    binary >=0.8.3 && <0.9,
    blaze-textual >=0.2 && <0.3,
    -- 0.11.2 added isValidUtf8, which checks a string column's bytes.
    bytestring >=0.11.2 && <0.12 || ^>=0.12.0,
    bytestring-lexing >=0.5 && <0.6,
    crypton-x509 >=1.5 && <2.0,
    crypton-x509-store >=1.5 && <2.0,
    crypton-x509-system >=1.5 && <2.0,
    data-default-class >=0.1.2 && <0.2 || ^>=0.2.0,
    deepseq >=1.4.6 && <1.5 || ^>=1.5.0,
    io-streams >=1.2 && <2.0,
    monad-loops >=0.4 && <0.5,
    network >=2.3 && <4.0,
    crypton-pem >=0.2.4 && <0.4,
    scientific >=0.3 && <0.4,
    text >=1.1 && <2.1 || ^>=2.1,
    time >=1.5.0 && <1.12 || ^>=1.12.2 || ^>=1.14,
    tls >=1.7.0 && <1.8 || ^>=1.8.0 || ^>=1.9.0 || ^>=2.0.0 || ^>=2.1.0 || ^>=2.2.0 || ^>=2.3.0 || ^>=2.4.0 || ^>=2.5.0,
    vector >=0.8 && <0.13 || ^>=0.13.0,
    word-compat >=0.0 && <0.1

  -- Decision: numeric conversions go through unwitch's named functions, which
  -- return Maybe where a conversion can lose information, instead of
  -- fromIntegral, which wraps silently. Its base >=4.18 matches the CI matrix
  -- (GHC 9.6 and up).
  build-depends:
    unwitch ^>=3.1

  -- Decision: require crypton 2.0, the first release with its side-channel
  -- fixes (none backported to 1.x). Before it, P-384/P-521 point multiplication
  -- and DH exponentiation took time that followed the secret, and tls runs them
  -- on the client's ephemeral key whenever the server picks such a group. 2.0
  -- rather than 2.1.x, as 2.0 has every fix we reach.
  build-depends:
    crypton ^>=2.0.0 || ^>=2.1.0 || ^>=2.2.0,
    ram >=0.20 && <0.23

  default-extensions:
    DeriveDataTypeable
    DeriveGeneric
    MultiWayIf
    OverloadedStrings


test-suite test
  import: common-options
  type:               exitcode-stdio-1.0
  main-is:            Main.hs
  other-modules:
    Aeson
    AesonBP
    BinLogEventCodes
    BoundsCheck
    DecoderRoundtrip
    DirectDecoding
    FieldRoundtrip
    FloatingPointText
    HandshakeGolden
    JSON
    PacketClassification
    Placeholders
    QC.ByteString
    QC.Combinator
    QC.Common
    Orphans
    ResultCharsets
    Sha1Scramble
    Sha256Scramble
    TCPStreams
    TextRowDecoding
    TypedValue
    Word24
    ZeroDates

  hs-source-dirs:     test
  build-depends:
    attoparsec < 1.0,
    base16-bytestring >=1.0 && <2.0,
    binary >=0.8,
    bytestring >=0.10,
    deepseq,
    directory < 2.0,
    filepath < 2.0,
    io-streams,
    mysql-haskell,
    network,
    QuickCheck >=2.7 && <3.0,
    quickcheck-instances < 1.0,
    scientific >=0.3.0,
    tasty >=0.11 && <2.0,
    tasty-expected-failure < 1.0,
    tasty-hunit < 1.0,
    tasty-quickcheck >=0.8 && < 1.0,
    text,
    time,
    unordered-containers < 1.0,
    vector

  default-extensions:
    MultiWayIf
    OverloadedStrings

  ghc-options:        -threaded 

test-suite integration
  type:               exitcode-stdio-1.0
  main-is:            Integration.hs
  other-modules:
    AbandonedReplies
    BinaryRow
    BinaryRowNew
    BinLog
    BinLogNew
    BinLogRowEvents
    CABundle
    CachingSha2
    ExecuteMany
    FloatingPoint
    LargeRows
    Latin1Results
    MariaDBNegotiation
    MultipleResults
    MysqlTests
    NonUtf8Results
    PlaceholderLiterals
    QueryApi
    QueryWithoutResultSet
    RoundtripBit
    RowDecoderQueries
    RoundtripYear
    SelectOne
    TestUser
    TextRow
    TLSConnection
    TextRowNew
    TypedValue
    UnixSocket
    UnsignedInsertId
    ZeroDateRoundtrip

  hs-source-dirs:     test
  build-depends:
    base,
    bytestring >=0.10,
    directory,
    io-streams,
    mysql-haskell,
    scientific,
    tasty >=0.11 && <2.0,
    tasty-hunit < 1.0,
    text,
    time,
    vector

  default-extensions:
    MultiWayIf
    OverloadedStrings

  ghc-options:        -threaded
  default-language:   Haskell2010

test-suite integration-mariadb
  type:               exitcode-stdio-1.0
  main-is:            IntegrationMariaDB.hs
  other-modules:
    MariaDBBulk
    MariaDBExtendedMetadata
    QueryApi
    TypedValue
    UnixSocket

  hs-source-dirs:     test
  build-depends:
    base,
    bytestring >=0.10,
    directory,
    io-streams,
    mysql-haskell,
    tasty >=0.11 && <2.0,
    tasty-hunit < 1.0,
    text,
    vector

  default-extensions:
    MultiWayIf
    OverloadedStrings

  ghc-options:        -threaded
  default-language:   Haskell2010

benchmark binary-parsers-bench
  import: common-options
  other-modules:
    Aeson
    AesonBP
    Common
    HttpReq
    Network.Wai.Handler.Warp.ReadInt
    Network.Wai.Handler.Warp.RequestHeader

  build-depends:
    attoparsec,
    binary,
    bytestring,
    case-insensitive < 2,
    criterion >=1.1 && <1.2 || ^>=1.6.3,
    deepseq,
    directory < 1.4,
    filepath < 1.6,
    http-types < 1.0,
    mysql-haskell,
    scanner < 0.4,
    scientific,
    text,
    unordered-containers,
    vector

  hs-source-dirs:   binary-parser-bench
  main-is:          Bench.hs
  type:             exitcode-stdio-1.0
  ghc-options:      -O2

benchmark bench24
  import: common-options
  type:             exitcode-stdio-1.0
  hs-source-dirs:   word24-bench
  main-is:          Benchmark.hs
  build-depends:
    criterion >=1.1,
    deepseq >=1.2 && <2,
    mysql-haskell

  ghc-options:      -O2

-- enable to debug the RULES    
-- executable exe
--   import: common-options
--   main-is: Main.hs
--   hs-source-dirs:
--       app
--   build-depends:
--       mysql-haskell
--   ghc-options: -Wno-unused-packages