summaryrefslogtreecommitdiff
path: root/libraries/template-haskell/template-haskell.cabal.in
blob: a3cfb6d765a116ed6af95078210e78ac47c51662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
-- WARNING: template-haskell.cabal is automatically generated from template-haskell.cabal.in by
-- ../../configure.  Make sure you are editing template-haskell.cabal.in, not
-- template-haskell.cabal.

name:           template-haskell
version:        2.19.0.0
-- NOTE: Don't forget to update ./changelog.md
license:        BSD3
license-file:   LICENSE
category:       Template Haskell
maintainer:     libraries@haskell.org
bug-reports:    https://gitlab.haskell.org/ghc/ghc/issues/new
synopsis:       Support library for Template Haskell
build-type:     Simple
Cabal-Version:  >= 1.10
description:
    This package provides modules containing facilities for manipulating
    Haskell source code using Template Haskell.
    .
    See <http://www.haskell.org/haskellwiki/Template_Haskell> for more
    information.

extra-source-files: changelog.md

source-repository head
    type:     git
    location: https://gitlab.haskell.org/ghc/ghc.git
    subdir:   libraries/template-haskell


-- We give the option to vendor filepath to avoid making filepath non-reinstallable..
-- see #21738 for why we are doing this now and what the plan is for the future.
Flag vendor-filepath
    Description: Vendor the dependency on filepath
    Default: False
    Manual: True

Library
    default-language: Haskell2010
    other-extensions:
        BangPatterns
        CPP
        DefaultSignatures
        DeriveDataTypeable
        DeriveGeneric
        FlexibleInstances
        RankNTypes
        RoleAnnotations
        ScopedTypeVariables

    exposed-modules:
        Language.Haskell.TH
        Language.Haskell.TH.Lib
        Language.Haskell.TH.Ppr
        Language.Haskell.TH.PprLib
        Language.Haskell.TH.Quote
        Language.Haskell.TH.Syntax
        Language.Haskell.TH.LanguageExtensions
        Language.Haskell.TH.CodeDo
        Language.Haskell.TH.Lib.Internal

    other-modules:
        Language.Haskell.TH.Lib.Map

    build-depends:
        base        >= 4.11 && < 4.18,
        ghc-boot-th == @ProjectVersionMunged@,
        ghc-prim,
        pretty      == 1.1.*

    if flag(vendor-filepath)
      other-modules:
        System.FilePath
        System.FilePath.Posix
        System.FilePath.Windows
      hs-source-dirs: ./vendored-filepath .
      default-extensions:
        ImplicitPrelude
    else
      build-depends: filepath
      hs-source-dirs: .

    ghc-options: -Wall

    -- We need to set the unit ID to template-haskell (without a
    -- version number) as it's magic.
    ghc-options: -this-unit-id template-haskell

    -- This should match the default-extensions used in 'ghc.cabal'. This way,
    -- GHCi can be used to load it along with the compiler.
    Default-Extensions:
        NoImplicitPrelude