cabal-version:       2.0
name:                STL-Linear
version:             0.1.0.0
synopsis:            STL Serialization and Deserialization
description:         Provides fast serialization and deserialization for both binary and ASCII STL 3D model files.
license:             MIT
license-file:        LICENSE
author:              timput
maintainer:          timput@gmail.com
copyright:           2021 timput
category:            Graphics
build-type:          Simple
extra-doc-files:     README.md
                   , CHANGELOG.md
tested-with:         GHC == 8.8.3

library
  hs-source-dirs:      src
  exposed-modules:     Graphics.STL
                     , Graphics.STL.Lazy
                     , Graphics.STL.Common

  build-depends:       base >= 4.12.0.0 && < 4.16
                     , attoparsec           >= 0.13.2 && < 0.14
                     , bytestring           >= 0.10.12 && < 0.11
                     , deepseq              >= 1.4.4 && < 1.5
                     , scientific           >= 0.3.6 && < 0.4
                     , binary               >= 0.8.8 && < 0.9
                     , linear               >= 1.21.5 && < 1.22
                     , vector               >= 0.12.3 && < 0.13

  ghc-options:         -Wall
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints
                       -fhide-source-paths
                       -Wmissing-export-lists
                       -Wpartial-fields

  default-language:    Haskell2010

test-suite STL-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs

  build-depends:       base
                     , STL-Linear
                     , binary
                     , bytestring
                     , attoparsec

  ghc-options:         -Wall
                       -threaded
                       -rtsopts
                       -with-rtsopts=-N
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints
                       -fhide-source-paths
                       -Wmissing-export-lists
                       -Wpartial-fields

  default-language:    Haskell2010

benchmark STL-benchmark
  type:                exitcode-stdio-1.0
  hs-source-dirs:      benchmark
  main-is:             Main.hs

  build-depends:       base
                     , gauge >= 0.2.5
                     , STL-Linear
                     , attoparsec
                     , bytestring
                     , binary

  ghc-options:         -Wall
                       -threaded
                       -rtsopts
                       -with-rtsopts=-N
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wcompat
                       -Widentities
                       -Wredundant-constraints
                       -fhide-source-paths
                       -Wmissing-export-lists
                       -Wpartial-fields

  default-language:    Haskell2010