packages feed

puzzle-draw-0.2.0.0: puzzle-draw.cabal

name:                puzzle-draw
version:             0.2.0.0
synopsis:            Creating graphics for pencil puzzles.
description:         puzzle-draw is a library and tool for drawing pencil
                     puzzles using Diagrams. It aims to provide a utility
                     layer on top of Diagrams to help with drawing arbitrary
                     puzzles, and to support several specific puzzles types
                     In addition, it includes functionality for parsing
                     puzzle data from a YAML file format.
license:             MIT
license-file:        LICENSE
author:              Robert Vollmert
maintainer:          rfvollmert@gmail.com
category:            Graphics
build-type:          Simple
extra-source-files:  README.md, CHANGES.md
data-files:          data/fonts/*.svg
cabal-version:       >=1.8

source-repository head
  type:     git
  location: http://github.com/robx/puzzle-draw.git

flag cairo
  description: Build against Cairo backend
  default:     False

library
  exposed-modules:     Data.Puzzles.Grid
                       Data.Puzzles.GridShape
                       Data.Puzzles.Util
                       Data.Puzzles.Elements
                       Data.Puzzles.Pyramid
                       Data.Puzzles.Sudoku
                       Data.Puzzles.Compose
                       Data.Puzzles.PuzzleTypes
                       Data.Puzzles.Code
                       Data.Puzzles.CmdLine
                       Text.Puzzles.Util
                       Text.Puzzles.Parsec
                       Text.Puzzles.Puzzle
                       Text.Puzzles.PuzzleTypes
                       Text.Puzzles.Code
                       Diagrams.Puzzles.Style
                       Diagrams.Puzzles.Grid
                       Diagrams.Puzzles.Lib
                       Diagrams.Puzzles.Elements
                       Diagrams.Puzzles.Widths
                       Diagrams.Puzzles.Pyramid
                       Diagrams.Puzzles.PuzzleGrids
                       Diagrams.Puzzles.PuzzleTypes
                       Diagrams.Puzzles.Draw
                       Diagrams.Puzzles.Code
                       Diagrams.Puzzles.CmdLine
  -- For access to the font files in the data directory.
  other-modules:       Paths_puzzle_draw
  build-depends:       base >= 4.8 && < 5,
                       diagrams-lib >= 1.3.1,
                       parsec >= 3.1,
                       yaml >= 0.8.4,
                       aeson >= 0.7,
                       unordered-containers >= 0.2,
                       containers >= 0.5,
                       hashable >= 1.2,
                       text >= 1.1,
                       SVGFonts >= 1.4,
                       vector-space >= 0.8,
                       mtl >= 2.1,
                       optparse-applicative >= 0.12 && < 0.13,
                       filepath >= 1.3,
                       linear
  if flag(cairo)
    cpp-options: "-DCAIRO"
    build-depends:     diagrams-cairo >= 1.3
  else
    build-depends:     diagrams-svg >= 1.3
  hs-source-dirs:      src
  ghc-options:         -Wall

executable drawpuzzle
  main-is:          drawpuzzle.hs
  hs-source-dirs:   src/tools
  build-depends:       base >= 4.8 && < 5,
                       puzzle-draw,
                       diagrams-lib >= 1.3,
                       yaml >= 0.8.4,
                       optparse-applicative >= 0.12,
                       aeson >= 0.7,
                       filepath >= 1.3
  if flag(cairo)
    cpp-options: "-DCAIRO"
    build-depends:     diagrams-cairo >= 1.3
  else
    build-depends:     diagrams-svg >= 1.3
  ghc-options:         -Wall

executable checkpuzzle
  main-is:          checkpuzzle.hs
  hs-source-dirs:   src/tools
  build-depends:       base >= 4.8 && < 5,
                       puzzle-draw,
                       yaml >= 0.8.4,
                       optparse-applicative >= 0.12,
                       aeson >= 0.7,
                       filepath >= 1.3
  ghc-options:         -Wall

test-suite test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  main-is:             tests.hs
  other-modules:       Data,
                       Util,
                       Data.Puzzles.GridSpec,
                       Data.Puzzles.GridShapeSpec,
                       Diagrams.Puzzles.GridSpec,
                       Text.Puzzles.PuzzleTypesSpec,
                       Text.Puzzles.UtilSpec
  build-depends:       base >= 4.8 && < 5,
                       tasty >= 0.8,
                       tasty-hspec,
                       tasty-hunit >= 0.8,
                       hspec,
                       yaml >= 0.8.4,
                       text >= 1.1,
                       deepseq >= 1.3,
                       containers >= 0.5,
                       blaze-svg >= 0.3,
                       diagrams-lib >= 1.3,
                       diagrams-svg >= 1.3,
                       bytestring >= 0.10,
                       puzzle-draw
  ghc-options:         -Wall

-- This should depend on the executable `drawpuzzle`
-- and not the library.
executable test-compare
  hs-source-dirs:      tests
  main-is:             compare.hs
  build-depends:       base >= 4.8 && < 5,
                       tasty >= 0.8,
                       tasty-golden >= 2.0,
                       filepath >= 1.3,
                       process >= 1.2
  ghc-options:         -Wall