forked from alanz/ghc-exactprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ghc-exactprint.cabal
136 lines (124 loc) · 4.45 KB
/
ghc-exactprint.cabal
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: ghc-exactprint
version: 0.4.1.0
synopsis: ExactPrint for GHC
description: Using the API Annotations available from GHC 7.10.2, this
library provides a means to round trip any code that can
be compiled by GHC, currently excluding lhs files.
.
It does this with a phased approach
.
* Delta - converts GHC API Annotations into relative
offsets, indexed by SrcSpan
.
* Transform - functions to facilitate changes to
the AST, adjusting the annotations generated in the
Delta phase to suit the changes.
.
* Print - converts an AST and its annotations to
properly formatted source text.
.
.
Note: requires GHC 7.10.2 or later
license: BSD3
license-file: LICENSE
author: Alan Zimmerman, Matthew Pickering
maintainer: alan.zimm@gmail.com
category: Development
build-type: Simple
extra-source-files: ChangeLog
tests/examples/*.hs
tests/examples/*.hs.bad
tests/examples/*.hs.expected
tests/examples/*.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
}
library
exposed-modules: Language.Haskell.GHC.ExactPrint
, Language.Haskell.GHC.ExactPrint.Annotate
, Language.Haskell.GHC.ExactPrint.Delta
, Language.Haskell.GHC.ExactPrint.GhcInterim
, Language.Haskell.GHC.ExactPrint.Lookup
, Language.Haskell.GHC.ExactPrint.Preprocess
, Language.Haskell.GHC.ExactPrint.Print
, Language.Haskell.GHC.ExactPrint.Transform
, Language.Haskell.GHC.ExactPrint.Types
, Language.Haskell.GHC.ExactPrint.Utils
, Language.Haskell.GHC.ExactPrint.Parsers
-- other-modules:
-- other-extensions:
GHC-Options: -Wall
build-depends: base >=4.7 && <4.9
, containers >= 0.5
, directory >= 1.2
, filepath >= 1.4
, ghc >= 7.10.2
, ghc-paths >= 0.1
, mtl >= 2.2.1
, syb >= 0.5
, free >= 4.12
hs-source-dirs: src
default-language: Haskell2010
if impl (ghc < 7.10.2)
buildable: False
Test-Suite test
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Test.hs
other-modules: Test.Common, Test.Consistency, Test.Transform
GHC-Options: -threaded
Default-language: Haskell2010
if impl (ghc < 7.10.2)
buildable: False
Build-depends: HUnit >= 1.2
, base < 5
, containers >= 0.5
, directory >= 1.2
, filepath >= 1.4
, ghc >= 7.10.2
, ghc-exactprint >= 0.3
, ghc-paths >= 0.1
, mtl >= 2.2.1
, syb >= 0.5
, silently >= 1.2
, filemanip >= 0.3
executable roundtrip
main-is: Roundtrip.hs
hs-source-dirs: tests
other-modules: Test.Common
default-language: Haskell2010
if impl (ghc >= 7.10.2) && flag (roundtrip)
build-depends:
HUnit
, base
, containers
, directory
, filemanip
, filepath
, ghc
, ghc-exactprint
, ghc-paths
, syb
, temporary
buildable: True
else
buildable: False
ghc-options:
-threaded
executable static
main-is: Static.hs
hs-source-dirs: tests
default-language: Haskell2010
if flag (roundtrip)
build-depends: base
, directory
, filepath
, Diff
buildable: True
else
buildable: False