packages feed

skylighting-0.3: skylighting.cabal

name:                skylighting
version:             0.3
synopsis:            syntax highlighting library
description:         Skylighting is a syntax highlighting library with
                     support for over one hundred languages.  It derives
                     its tokenizers from XML syntax definitions used
                     by KDE's KSyntaxHighlighting framework, so any
                     syntax supported by that framework can be added.
                     An optional command-line program is provided.

                     Skylighting is intended to be the successor to
                     highlighting-kate.

homepage:            https://github.com/jgm/skylighting
license:             GPL-2
license-file:        LICENSE
author:              John MacFarlane
maintainer:          jgm@berkeley.edu
copyright:           (C) 2016 John MacFarlane
category:            Text
build-type:          Simple
extra-source-files:  changelog.md
                     README.md
                     test/default.theme
                     test/cases/abc.ada
                     test/cases/abc.agda
                     test/cases/abc.c
                     test/cases/abc.clojure
                     test/cases/abc.cpp
                     test/cases/abc.cs
                     test/cases/abc.d
                     test/cases/abc.fortran
                     test/cases/abc.go
                     test/cases/abc.haskell
                     test/cases/abc.java
                     test/cases/abc.javascript
                     test/cases/abc.julia
                     test/cases/abc.kotlin
                     test/cases/abc.lisp
                     test/cases/abc.matlab
                     test/cases/abc.ocaml
                     test/cases/abc.perl
                     test/cases/abc.php
                     test/cases/abc.prolog
                     test/cases/abc.python
                     test/cases/abc.r
                     test/cases/abc.ruby
                     test/cases/abc.scala
                     test/cases/abc.scheme
                     test/cases/abc.tcl
                     test/cases/archive.rhtml
                     test/cases/life.lua
                     test/cases/hk91.html
                     test/cases/if.cmake
                     test/expected/abc.ada.native
                     test/expected/abc.agda.native
                     test/expected/abc.c.native
                     test/expected/abc.clojure.native
                     test/expected/abc.cpp.native
                     test/expected/abc.cs.native
                     test/expected/abc.d.native
                     test/expected/abc.fortran.native
                     test/expected/abc.go.native
                     test/expected/abc.haskell.native
                     test/expected/abc.java.native
                     test/expected/abc.javascript.native
                     test/expected/abc.julia.native
                     test/expected/abc.kotlin.native
                     test/expected/abc.lisp.native
                     test/expected/abc.matlab.native
                     test/expected/abc.ocaml.native
                     test/expected/abc.perl.native
                     test/expected/abc.php.native
                     test/expected/abc.prolog.native
                     test/expected/abc.python.native
                     test/expected/abc.r.native
                     test/expected/abc.ruby.native
                     test/expected/abc.scala.native
                     test/expected/abc.scheme.native
                     test/expected/abc.tcl.native
                     test/expected/archive.rhtml.native
                     test/expected/life.lua.native
                     test/expected/hk91.html.native
                     test/expected/if.cmake.native

cabal-version:       >=1.10

source-repository head
  type:              git
  location:          https://github.com/jgm/skylighting.git

library
  exposed-modules:     Skylighting
                       Skylighting.Types
                       Skylighting.Regex
                       Skylighting.Parser
                       Skylighting.Styles
                       Skylighting.Tokenizer
                       Skylighting.Format.HTML
                       Skylighting.Format.LaTeX
                       Skylighting.Syntax
  other-modules:
                       Skylighting.Syntax.Abc
                       Skylighting.Syntax.Actionscript
                       Skylighting.Syntax.Ada
                       Skylighting.Syntax.Agda
                       Skylighting.Syntax.Alert
                       Skylighting.Syntax.AlertIndent
                       Skylighting.Syntax.Apache
                       Skylighting.Syntax.Asn1
                       Skylighting.Syntax.Asp
                       Skylighting.Syntax.Ats
                       Skylighting.Syntax.Awk
                       Skylighting.Syntax.Bash
                       Skylighting.Syntax.Bibtex
                       Skylighting.Syntax.Boo
                       Skylighting.Syntax.C
                       Skylighting.Syntax.Changelog
                       Skylighting.Syntax.Clojure
                       Skylighting.Syntax.Cmake
                       Skylighting.Syntax.Coffee
                       Skylighting.Syntax.Coldfusion
                       Skylighting.Syntax.Commonlisp
                       Skylighting.Syntax.Cpp
                       Skylighting.Syntax.Cs
                       Skylighting.Syntax.Css
                       Skylighting.Syntax.Curry
                       Skylighting.Syntax.D
                       Skylighting.Syntax.Diff
                       Skylighting.Syntax.Djangotemplate
                       Skylighting.Syntax.Dockerfile
                       Skylighting.Syntax.Dot
                       Skylighting.Syntax.Doxygen
                       Skylighting.Syntax.Doxygenlua
                       Skylighting.Syntax.Dtd
                       Skylighting.Syntax.Eiffel
                       Skylighting.Syntax.Elixir
                       Skylighting.Syntax.Email
                       Skylighting.Syntax.Erlang
                       Skylighting.Syntax.Fasm
                       Skylighting.Syntax.Fortran
                       Skylighting.Syntax.Fsharp
                       Skylighting.Syntax.Gcc
                       Skylighting.Syntax.Glsl
                       Skylighting.Syntax.Gnuassembler
                       Skylighting.Syntax.Go
                       Skylighting.Syntax.Hamlet
                       Skylighting.Syntax.Haskell
                       Skylighting.Syntax.Haxe
                       Skylighting.Syntax.Html
                       Skylighting.Syntax.Idris
                       Skylighting.Syntax.Ini
                       Skylighting.Syntax.Isocpp
                       Skylighting.Syntax.Java
                       Skylighting.Syntax.Javadoc
                       Skylighting.Syntax.Javascript
                       Skylighting.Syntax.Json
                       Skylighting.Syntax.Jsp
                       Skylighting.Syntax.Julia
                       Skylighting.Syntax.Kotlin
                       Skylighting.Syntax.Latex
                       Skylighting.Syntax.Lex
                       Skylighting.Syntax.Lilypond
                       Skylighting.Syntax.LiterateCurry
                       Skylighting.Syntax.LiterateHaskell
                       Skylighting.Syntax.Llvm
                       Skylighting.Syntax.Lua
                       Skylighting.Syntax.M4
                       Skylighting.Syntax.Makefile
                       Skylighting.Syntax.Mandoc
                       Skylighting.Syntax.Markdown
                       Skylighting.Syntax.Mathematica
                       Skylighting.Syntax.Matlab
                       Skylighting.Syntax.Maxima
                       Skylighting.Syntax.Mediawiki
                       Skylighting.Syntax.Metafont
                       Skylighting.Syntax.Mips
                       Skylighting.Syntax.Modelines
                       Skylighting.Syntax.Modula2
                       Skylighting.Syntax.Modula3
                       Skylighting.Syntax.Monobasic
                       Skylighting.Syntax.Nasm
                       Skylighting.Syntax.Noweb
                       Skylighting.Syntax.Objectivec
                       Skylighting.Syntax.Objectivecpp
                       Skylighting.Syntax.Ocaml
                       Skylighting.Syntax.Octave
                       Skylighting.Syntax.Opencl
                       Skylighting.Syntax.Pascal
                       Skylighting.Syntax.Perl
                       Skylighting.Syntax.Php
                       Skylighting.Syntax.Pike
                       Skylighting.Syntax.Postscript
                       Skylighting.Syntax.Prolog
                       Skylighting.Syntax.Pure
                       Skylighting.Syntax.Purebasic
                       Skylighting.Syntax.Python
                       Skylighting.Syntax.R
                       Skylighting.Syntax.Relaxng
                       Skylighting.Syntax.Relaxngcompact
                       Skylighting.Syntax.Rest
                       Skylighting.Syntax.Rhtml
                       Skylighting.Syntax.Roff
                       Skylighting.Syntax.Ruby
                       Skylighting.Syntax.Rust
                       Skylighting.Syntax.Scala
                       Skylighting.Syntax.Scheme
                       Skylighting.Syntax.Sci
                       Skylighting.Syntax.Sed
                       Skylighting.Syntax.Sgml
                       Skylighting.Syntax.SqlMysql
                       Skylighting.Syntax.SqlPostgresql
                       Skylighting.Syntax.Sql
                       Skylighting.Syntax.Tcl
                       Skylighting.Syntax.Tcsh
                       Skylighting.Syntax.Texinfo
                       Skylighting.Syntax.Verilog
                       Skylighting.Syntax.Vhdl
                       Skylighting.Syntax.Xml
                       Skylighting.Syntax.Xorg
                       Skylighting.Syntax.Xslt
                       Skylighting.Syntax.Xul
                       Skylighting.Syntax.Yacc
                       Skylighting.Syntax.Yaml
                       Skylighting.Syntax.Zsh
  other-extensions:    CPP, Arrows
  build-depends:       base >= 4.7 && < 5.0,
                       mtl,
                       text,
                       binary,
                       bytestring,
                       directory,
                       filepath,
                       aeson,
                       case-insensitive,
                       utf8-string,
                       hxt,
                       safe,
                       blaze-html >= 0.5,
                       containers
  if flag(system-pcre)
    build-depends:     regex-pcre
  else
    build-depends:     regex-pcre-builtin
  hs-source-dirs:      src
  if impl(ghc < 7.10)
     hs-source-dirs:   prelude
     other-modules:    Prelude
  ghc-prof-options:    -fprof-auto-exported
  default-language:    Haskell2010
  ghc-options:         -Wall
  if flag(bootstrap)
    buildable:         False

Flag bootstrap
  Description:   Only build skylighting-extract
  Default:       False

Flag executable
  Description:   Build skylighting CLI tool
  Default:       False

Flag system-pcre
  Description:   Use regex-pcre instead of regex-pcre-builtin
  Default:       False

executable skylighting-extract
  build-depends:       base >= 4.7 && < 5.0,
                       filepath,
                       bytestring,
                       text,
                       safe,
                       hxt,
                       utf8-string,
                       case-insensitive,
                       aeson,
                       binary,
                       containers,
                       directory
  if flag(system-pcre)
    build-depends:     regex-pcre
  else
    build-depends:     regex-pcre-builtin
  hs-source-dirs:      bin, src
  if impl(ghc < 7.10)
     hs-source-dirs:   prelude
     other-modules:    Prelude
  main-is:             extract.hs
  default-language:    Haskell2010
  other-extensions:    CPP
  ghc-options:         -Wall
  other-modules:       Skylighting.Types
                       Skylighting.Regex
                       Skylighting.Parser
  if flag(bootstrap)
    buildable:         True
  else
    buildable:         False

executable skylighting
  build-depends:       base >= 4.7 && < 5.0,
                       filepath,
                       text,
                       pretty-show,
                       containers,
                       directory,
                       bytestring,
                       blaze-html >= 0.5,
                       skylighting
  hs-source-dirs:      bin
  if impl(ghc < 7.10)
     hs-source-dirs:   prelude
     other-modules:    Prelude
  main-is:             main.hs
  default-language:    Haskell2010
  other-extensions:    CPP
  ghc-options:         -Wall
  if flag(bootstrap)
    buildable:         False
  if flag(executable)
    buildable:         True
  else
    buildable:         False

test-suite test-skylighting
  type:           exitcode-stdio-1.0
  main-is:        test-skylighting.hs
  hs-source-dirs: test
  if impl(ghc < 7.10)
     hs-source-dirs:   prelude
     other-modules:    Prelude
  build-depends:  base >= 4.7 && < 5.0,
                  HUnit,
                  tasty,
                  tasty-golden,
                  tasty-hunit,
                  containers,
                  random,
                  Diff,
                  text,
                  pretty-show,
                  aeson,
                  bytestring,
                  directory,
                  filepath,
                  skylighting
  default-language: Haskell2010
  ghc-options:    -Wall
  if flag(bootstrap)
    buildable:         False

benchmark benchmark-skylighting
  Type:            exitcode-stdio-1.0
  Main-Is:         benchmark.hs
  Hs-Source-Dirs:  benchmark
  if impl(ghc < 7.10)
     Hs-Source-Dirs: prelude
     Other-Modules:  Prelude
  Build-Depends:   skylighting,
                   base >= 4.2 && < 5,
                   filepath,
                   text,
                   containers,
                   directory,
                   criterion >= 1.0 && < 1.2
  Ghc-Options:   -rtsopts -Wall -fno-warn-unused-do-bind
  Default-Language: Haskell2010