packages feed

friday-0.1.1: friday.cabal

name:                   friday
version:                0.1.1
synopsis:               A functionnal image processing library for Haskell.
homepage:               https://github.com/RaphaelJ/friday
license:                LGPL-3
license-file:           LICENSE
author:                 Raphael Javaux <raphaeljavaux[at]gmail.com>
maintainer:             Raphael Javaux <raphaeljavaux[at]gmail.com>

description:            Friday provides functions to manipulate images in a
                        functional way.
                        The library is designed to be fast, generic and
                        type-safe.
                        .
                        The library uses FFI calls to the DevIL image library to
                        read images from a wide variety of formats, including
                        BMP, JPG, PNG, GIF, ICO and PSD. Except for I/Os, friday
                        is entirely written in Haskell.
                        .
                        Images can be represented in two representations:
                        .
                        * the 'Manifest' representation stores images in Haskell
                        'Vector's ;
                        .
                        * the 'Delayed' representation uses functions to produce
                        images pixels. These images can be combined to produce
                        complex transformations. By some inlining, Haskell
                        compilers are able to produce fast algorithms by
                        removing intermediate structures.
                        .
                        The library currently support four color spaces: RGB,
                        RGBA, HSV and gray-scale images.
                        .
                        Please read our
                        <https://github.com/RaphaelJ/friday/blob/master/README.md README>
                        to get a detailed usage and some examples.

category:               Graphics
stability:              Experimental
build-type:             Simple
cabal-version:          >= 1.10

Flag examples
    Description:   Compiles examples from the example/ directory.
    Default:       False

library
    exposed-modules:    Vision.Detector.Edge
                        Vision.Histogram
                        Vision.Image
                        Vision.Image.Grey
                        Vision.Image.Grey.Conversion
                        Vision.Image.Grey.Type
                        Vision.Image.Filter
                        Vision.Image.HSV
                        Vision.Image.HSV.Conversion
                        Vision.Image.HSV.Type
                        Vision.Image.Interpolate
                        Vision.Image.Mutable
                        Vision.Image.RGBA
                        Vision.Image.RGBA.Conversion
                        Vision.Image.RGBA.Type
                        Vision.Image.RGB
                        Vision.Image.RGB.Conversion
                        Vision.Image.RGB.Type
                        Vision.Image.Storage
                        Vision.Image.Threshold
                        Vision.Image.Transform
                        Vision.Image.Type
                        Vision.Primitive
                        Vision.Primitive.Shape

    ghc-options:        -Wall -O2
    hs-source-dirs:     src/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , bytestring              >= 0.10         && < 1.0
                      , convertible             >= 1            && < 2
                      , primitive               >= 0.5.2.1      && < 0.6
                      , ratio-int               >= 0.1.2        && < 0.2
                      , vector                  >= 0.10.0.1     && < 1.0
                      , transformers            >= 0.3          && < 0.4

    Build-tools:        hsc2hs

    Extra-Libraries:    IL

executable      delayed
    if !flag(examples)
        Buildable: False

    main-is:            Delayed.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     example/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , friday

executable      canny
    if !flag(examples)
        Buildable: False

    main-is:            Canny.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     example/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , friday

executable      gaussian_blur
    if !flag(examples)
        Buildable: False

    main-is:            GaussianBlur.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     example/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , friday

executable      histogram
    if !flag(examples)
        Buildable: False

    main-is:            Histogram.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     example/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , friday

executable      resize_image
    if !flag(examples)
        Buildable: False

    main-is:            ResizeImage.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     example/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , friday


Benchmark       benchmark
    type:               exitcode-stdio-1.0

    main-is:            Benchmark.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     bench/
    default-language:   Haskell2010

    build-depends:      base                    >= 4            && < 5
                      , criterion               >= 1.0          && < 2.0
                      , friday

Test-Suite      test
    type:       exitcode-stdio-1.0

    main-is:            Test.hs
    ghc-options:        -Wall -O2 -rtsopts
    hs-source-dirs:     test/
    default-language:   Haskell2010

    build-depends:      base                         >= 4            && < 5
                      , QuickCheck                   >= 2.6          && < 3
                      , friday
                      , test-framework               >= 0.8          && < 0.9
                      , test-framework-quickcheck2   >= 0.3.0.2      && < 0.4
                      , vector                       >= 0.10.0.1     && < 1.0