packages feed

ghc-exactprint-1.4.0: ghc-exactprint.cabal

name:                ghc-exactprint
version:             1.4.0
synopsis:            ExactPrint for GHC
description:         Using the API Annotations available from GHC 9.2.1, this
                     library provides a means to round trip any code that can
                     be compiled by GHC, currently excluding lhs files.
                     .
                     Note: requires GHC 9.2 or later. For GHC versions from
                           7.10.2 to 9.0.* see this library with versions < 1.1
                     .

license:             BSD3
license-file:        LICENSE
author:              Alan Zimmerman, Matthew Pickering
maintainer:          alan.zimm@gmail.com
category:            Development
build-type:          Simple
tested-with:         GHC == 9.2.1
extra-source-files:  ChangeLog
                     tests/examples/failing/*.hs
                     tests/examples/ghc710-only/*.hs
                     tests/examples/ghc710/*.hs
                     tests/examples/ghc80/*.hs
                     tests/examples/ghc810/*.hs
                     tests/examples/ghc82/*.hs
                     tests/examples/ghc84/*.hs
                     tests/examples/ghc86/*.hs
                     tests/examples/ghc88/*.hs
                     tests/examples/ghc90/*.hs
                     tests/examples/ghc92/*.hs
                     tests/examples/pre-ghc810/*.hs
                     tests/examples/pre-ghc86/*.hs
                     tests/examples/pre-ghc90/*.hs
                     tests/examples/vect/*.hs
                     tests/examples/transform/*.hs
                     tests/examples/failing/*.hs.bad
                     tests/examples/transform/*.hs.expected
                     tests/examples/ghc710/*.hs-boot
cabal-version:       >=1.10

source-repository head
  type:     git
  location: https://github.com/alanz/ghc-exactprint.git

Flag roundtrip {
  Description: Build roundtripping executables
  Default:     False
}

Flag dev {
  Description: Development mode, do not use ghc-exactprint lib in the tests
  Default:     False
}


library
  exposed-modules:     Language.Haskell.GHC.ExactPrint
                     , Language.Haskell.GHC.ExactPrint.ExactPrint
                     , Language.Haskell.GHC.ExactPrint.Lookup
                     , Language.Haskell.GHC.ExactPrint.Orphans
                     , Language.Haskell.GHC.ExactPrint.Parsers
                     , Language.Haskell.GHC.ExactPrint.Preprocess
                     , Language.Haskell.GHC.ExactPrint.Transform
                     , Language.Haskell.GHC.ExactPrint.Types
                     , Language.Haskell.GHC.ExactPrint.Utils


  hs-source-dirs:      src
  -- other-modules:
  -- other-extensions:
  GHC-Options:         -Wall -Wredundant-constraints
  -- GHC-Options:         -Weverything
  build-depends:       base >=4.16 && <4.18
                     , bytestring >= 0.10.6
                     , containers >= 0.5
                     , ordered-containers
                     , data-default
                     , directory >= 1.2
                     , filepath  >= 1.4
                     , ghc       >= 7.10.2
                     , ghc-paths >= 0.1
                     , mtl       >= 2.2.1
                     , syb       >= 0.5
                     , free      >= 4.12
                     , fail      >= 4.9 && <4.10
                     , ghc-boot


  default-language:    Haskell2010
  if impl (ghc < 9.2)
      buildable: False

Test-Suite test
  type:                exitcode-stdio-1.0
  if flag (dev)
    hs-source-dirs:      tests
                         src
  else
    hs-source-dirs:      tests

  main-is:             Test.hs
  other-modules:       Test.Common
                     , Test.CommonUtils
                     , Test.NoAnnotations
                     , Test.Transform
  GHC-Options:         -threaded -Wall -Wredundant-constraints
  Default-language:    Haskell2010
  if impl (ghc < 9.2)
      buildable: False
  Build-depends:       HUnit >= 1.2
                     , base < 4.18
                     , bytestring
                     , containers >= 0.5
                     , ordered-containers
                     , data-default
                     , Diff
                     , directory >= 1.2
                     , filepath  >= 1.4
                     , ghc  >= 7.10.2
                     , ghc-paths  >= 0.1
                     , mtl        >= 2.2.1
                     , syb        >= 0.5
                     , silently   >= 1.2
                     , filemanip  >= 0.3
                     -- for the lib only
                     , fail >= 4.9 && <4.10
                     , ghc-boot
  if flag (dev)
      build-depends: free
  else
      build-depends: ghc-exactprint

executable roundtrip
  main-is: Roundtrip.hs
  hs-source-dirs: tests
  other-modules: Test.Common
                 Test.CommonUtils
                 -- Test.Consistency
  default-language:    Haskell2010
  if impl (ghc >= 9.2) && flag (roundtrip)
    build-depends:
                 HUnit
               , base
               , containers
               , directory
               , filemanip
               , filepath
               , ghc
               , ghc-exactprint
               , ghc-paths
               , syb
               , temporary
               , time
               , ghc-boot
    buildable: True
  else
    buildable: False
  GHC-Options:         -threaded -Wall -Wredundant-constraints

executable static
  main-is: Static.hs
  hs-source-dirs: tests
  default-language:    Haskell2010
  if flag (roundtrip)
    build-depends: base
                 , directory
                 , filemanip
                 , filepath
                 , ghc
                 , Diff
                 , ghc-boot
    buildable: True
  else
    buildable: False
  GHC-Options:         -threaded -Wall -Wredundant-constraints

executable prepare-hackage
  main-is: PrepareHackage.hs
  hs-source-dirs: tests
  default-language:    Haskell2010
  if flag (roundtrip)
    build-depends: base
                 , containers
                 , directory
                 , filemanip
                 , filepath
                 , ghc       >= 9.2
                 , ghc-paths >= 0.1
                 , HUnit
                 , text   >= 1.2.2
                 , turtle >= 1.3.0
                 , ghc-boot
    buildable: True
  else
    buildable: False
  GHC-Options:         -threaded -Wall -Wredundant-constraints