ghc-source-gen/package.yaml
2021-08-12 13:23:54 +01:00

127 lines
3.1 KiB
YAML

# Copyright 2019 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
name: ghc-source-gen
version: 0.4.1.0
github: "google/ghc-source-gen"
license: BSD3
author: "Judah Jacobson"
maintainer: "judahjacobson@google.com"
copyright: "Google LLC"
extra-source-files:
- README.md
- ChangeLog.md
synopsis: Constructs Haskell syntax trees for the GHC API.
category: Development
description: |
@ghc-source-gen@ is a library for generating Haskell source code.
It uses the <https://hackage.haskell.org/package/ghc ghc> library
to support recent language extensions, and provides a simple, consistent
interface across several major versions of GHC.
.
To get started, take a look at the "GHC.SourceGen" module.
.
For more information, please see the <https://github.com/google/ghc-source-gen README>.
dependencies:
- base >= 4.7 && < 5
- ghc >= 8.4 && < 9.2
default-extensions:
- DataKinds
- FlexibleInstances
- TypeSynonymInstances
library:
when:
# GHC-8.10 introduced hierarchical modules.
# For compatibility, define wrapper modules for older GHC versions.
- condition: impl(ghc<8.10)
source-dirs: compat
other-modules:
- GHC.Hs
- GHC.Hs.Binds
- GHC.Hs.Decls
- GHC.Hs.Expr
- GHC.Hs.Extension
- GHC.Hs.ImpExp
- GHC.Hs.Lit
- GHC.Hs.Pat
- GHC.Hs.Type
- GHC.Hs.Utils
- GHC.Driver.Monad
- GHC.Driver.Session
- GHC.Utils.Outputable
- GHC.Types.Basic
- GHC.Plugins
- GHC.Tc.Types.Evidence
- condition: impl(ghc>=8.10) && impl(ghc<9.0)
source-dirs: compat-8.10
other-modules:
- GHC.Hs.Type
- GHC.Driver.Monad
- GHC.Driver.Session
- GHC.Utils.Outputable
- GHC.Types.Basic
- GHC.Plugins
- GHC.Tc.Types.Evidence
source-dirs: src
other-modules:
- GHC.SourceGen.Binds.Internal
- GHC.SourceGen.Expr.Internal
- GHC.SourceGen.Lit.Internal
- GHC.SourceGen.Name.Internal
- GHC.SourceGen.Syntax.Internal
- GHC.SourceGen.Type.Internal
tests:
pprint_examples:
main: pprint_examples.hs
source-dirs: tests
dependencies:
- ghc-source-gen
- ghc-paths == 0.1.*
- tasty >= 1.0 && < 1.5
- tasty-hunit == 0.10.*
when:
- condition: impl(ghc<9.0)
source-dirs: compat
other-modules:
- GHC.Utils.Outputable
# TODO: Fill out this test, and use it to replace pprint_examples.
pprint_test:
main: pprint_test.hs
source-dirs: tests
dependencies:
- ghc-source-gen
- ghc-paths == 0.1.*
- tasty >= 1.0 && < 1.5
- tasty-hunit == 0.10.*
when:
- condition: impl(ghc<9.0)
source-dirs: compat
other-modules:
- GHC.Driver.Monad
- GHC.Driver.Session
- GHC.Utils.Outputable
name_test:
main: name_test.hs
source-dirs: tests
dependencies:
- ghc-source-gen
- QuickCheck >= 2.10 && < 2.15
- tasty >= 1.0 && < 1.5
- tasty-hunit == 0.10.*
- tasty-quickcheck >= 0.9 && < 0.11