packages feed

literatex-0.4.0.0: literatex.cabal

cabal-version:      3.0
name:               literatex
version:            0.4.0.0
synopsis:           transform literate source code to Markdown
description:
  This package provides a library as well as a command-line utility that
  transforms literate source code to Markdown.  Please see the README on
  GitHub at <https://github.com/ExtremaIS/literatex-haskell#readme>.
homepage:           https://github.com/ExtremaIS/literatex-haskell#readme
bug-reports:        https://github.com/ExtremaIS/literatex-haskell/issues
license:            MIT
license-file:       LICENSE
author:             Travis Cardwell <travis.cardwell@extrema.is>
maintainer:         Travis Cardwell <travis.cardwell@extrema.is>
copyright:          Copyright (c) 2021-2025 Travis Cardwell
category:           Utils
build-type:         Simple

extra-doc-files:
  CHANGELOG.md
  README.md

tested-with:
  GHC ==8.8.4
   || ==8.10.7
   || ==9.0.2
   || ==9.2.8
   || ==9.4.8
   || ==9.6.6
   || ==9.8.4
   || ==9.10.1
   || ==9.12.1

source-repository head
  type: git
  location: https://github.com/ExtremaIS/literatex-haskell.git

flag examples
  description: build examples
  default: False

-- This flag is referenced in the Stack build-constraints.yaml configuration.
flag optparse-applicative_ge_0_18
  description: Use optparse-applicative 0.18 or newer
  default: False
  manual: False

library
  hs-source-dirs: src
  exposed-modules:
      LiterateX
    , LiterateX.Parser
    , LiterateX.Renderer
    , LiterateX.SourceDefaults
    , LiterateX.Types
    , LiterateX.Types.CodeLanguage
    , LiterateX.Types.SourceFormat
    , LiterateX.Types.SourceLine
    , LiterateX.Types.TargetFormat
  other-modules:
      Paths_literatex
  autogen-modules:
      Paths_literatex
  build-depends:
      base >=4.13.0.0 && <4.22
    , bytestring >=0.10.10.1 && <0.13
    , conduit >=1.3.4 && <1.4
    , text >=1.2.4.0 && <2.2
    , ttc >=0.4.0.0 && <1.6
    , unliftio >=0.2.13.1 && <0.3
  default-language: Haskell2010
  default-extensions:
      OverloadedStrings
  ghc-options: -Wall

executable literatex
  hs-source-dirs: app
  main-is: Main.hs
  other-modules:
      LibOA
  build-depends:
      base
    , literatex
    , ttc
  if flag(optparse-applicative_ge_0_18)
    build-depends:
        optparse-applicative >=0.18 && <0.19
      , prettyprinter >=1.7.1 && <1.8
  else
    build-depends:
        ansi-wl-pprint >=0.6.9 && <1.1
      , optparse-applicative >=0.15.1.0 && <0.18
  default-language: Haskell2010
  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N

executable example-highlevel
  if flag(examples)
    buildable: True
  else
    buildable: False
  hs-source-dirs: examples
  main-is: highlevel.lhs
  build-depends:
      base
    , literatex
  default-language: Haskell2010
  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N

executable example-lowlevel
  if flag(examples)
    buildable: True
  else
    buildable: False
  hs-source-dirs: examples
  main-is: lowlevel.hs
  build-depends:
      base
    , literatex
  default-language: Haskell2010
  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N

test-suite literatex-test
  type: exitcode-stdio-1.0
  hs-source-dirs: test
  main-is: Spec.hs
  other-modules:
      LiterateX.Test.API
    , LiterateX.Test.SourceFormat
    , LiterateX.Test.SourceFormat.DoubleDash
    , LiterateX.Test.SourceFormat.DoubleSlash
    , LiterateX.Test.SourceFormat.Hash
    , LiterateX.Test.SourceFormat.LispSemicolons
    , LiterateX.Test.SourceFormat.LiterateHaskell
    , LiterateX.Test.SourceFormat.Percent
    , LiterateX.Test.TargetFormat
  build-depends:
      base
    , bytestring
    , filepath >=1.4.2.1 && <1.6
    , literatex
    , tasty >=1.2.3 && <1.6
    , tasty-hunit >=0.10.0.3 && <0.11
    , text
    , ttc
    , unliftio
  default-language: Haskell2010
  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N