packages feed

units-2.3: units.cabal

name:           units
version:        2.3
cabal-version:  >= 1.10
synopsis:       A domain-specific type system for dimensional analysis
homepage:       https://github.com/goldfirere/units
category:       Math
author:         Richard Eisenberg <eir@cis.upenn.edu>
maintainer:     Richard Eisenberg <eir@cis.upenn.edu>, Takayuki Muranushi <muranushi@gmail.com>
bug-reports:    https://github.com/goldfirere/units/issues
stability:      experimental
extra-source-files: README.md
                  , CHANGES.md
                  , Tests/*.hs
                  , Tests/README.md
                  , Tests/Compile/*.hs
                  , Tests/Compile/UnitParser/*.hs
                  , units-defs/Data/Constants/*.hs
                  , units-defs/Data/Dimensions/*.hs
                  , units-defs/Data/Metrology/*.hs
                  , units-defs/Data/Metrology/SI/*.hs
                  , units-defs/Data/Units/*.hs
                  , units-defs/Data/Units/SI/*.hs
                  , units-defs/Data/Units/US/*.hs
license:        BSD3
license-file:   LICENSE
build-type:     Simple
description:

    The units package provides a mechanism for compile-time
    dimensional analysis in Haskell programs. It defines an embedded
    type system based on units-of-measure. The units defined are fully
    extensible, and need not relate to physical properties.

    The package supports defining multiple inter-convertible units,
    such as Meter and Foot. When extracting a number from a
    dimensioned quantity, the desired unit must be specified, and the
    value is converted into that unit.

    If you are looking for specific systems of units (such as SI),
    please see the `units-defs` package.

    The Haddock documentation is insufficient for using the units
    package. Please see the README file, available from the package
    home page.

source-repository this
  type:     git
  location: https://github.com/goldfirere/units.git
  tag:      v2.3

library
  ghc-options: -Wall

  if impl(ghc >= 7.10)
    ghc-options: -fno-warn-unticked-promoted-constructors

  build-depends: base >= 4.7 && < 5
               , th-desugar >= 1.5.4
               , singletons >= 0.9 && < 2
               , vector-space >= 0.8
               , template-haskell
               , mtl >= 1.1
               , multimap >= 1.2
               , syb >= 0.3
               , containers >= 0.4
               , units-parser >= 0.1 && < 1.0
  exposed-modules:
    Data.Metrology,
    Data.Metrology.Internal,
    Data.Metrology.Show,
    Data.Metrology.Unsafe,
    Data.Metrology.Z,
    Data.Metrology.Set,
    Data.Metrology.Vector,
    Data.Metrology.Parser,
    Data.Metrology.Poly,
    Data.Metrology.TH,
    Data.Metrology.Quantity

  other-modules:
    Data.Metrology.Factor,
    Data.Metrology.LCSU,
    Data.Metrology.Qu,
    Data.Metrology.Dimensions,
    Data.Metrology.Units,
    Data.Metrology.Combinators,
    Data.Metrology.Validity

    -- cabal now recommends that TH be explicitly listed in cabal files
  other-extensions: TemplateHaskell
  default-language: Haskell2010

test-suite main
  type:             exitcode-stdio-1.0
  main-is:          Tests/Main.hs
  default-language: Haskell2010
  build-depends:    units
                  , base >= 4.7 && < 5
                  , th-desugar >= 1.5.4
                  , singletons >= 0.9 && < 2
                  , vector-space >= 0.8
                  , tasty >= 0.8
                  , tasty-hunit >= 0.8
                  , HUnit-approx >= 1.0
                  , template-haskell
                  , mtl >= 1.1
                  , multimap >= 1.2
                  , syb >= 0.3
                  , containers >= 0.4
                  , units-parser >= 0.1 && < 1.0
  hs-source-dirs:   units-defs, .

    -- optimize compile time, not runtime!
  ghc-options:        -O0 -Wall -main-is Tests.Main
  if impl(ghc >= 7.10)
    ghc-options: -fno-warn-unticked-promoted-constructors

    -- GHC 7.10 requires this in more places, and I don't feel like ferreting out exactly
    -- where.
  default-extensions: FlexibleContexts