forked from ku-fpg/hermit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hermit.cabal
279 lines (254 loc) · 9.76 KB
/
hermit.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
name: hermit
version: 1.0.0.0
synopsis: Haskell Equational Reasoning Model-to-Implementation Tunnel
description:
HERMIT is a Haskell-specific toolkit designed to mechanize
equational reasoning and program transformation during compilation in GHC.
.
Examples can be found in the examples sub-directory.
.
@
$ cd examples/reverse
@
.
Example of running a script.
.
@
$ hermit Reverse.hs Reverse.hss resume
[starting HERMIT v1.0.0.0 on Reverse.hs]
% ghc Reverse.hs -fforce-recomp -O2 -dcore-lint -fexpose-all-unfoldings -fsimple-list-literals -fplugin=HERMIT -fplugin-opt=HERMIT:Main:Reverse.hss -fplugin-opt=HERMIT:Main:resume
[1 of 2] Compiling HList ( HList.hs, HList.o )
Loading package ghc-prim ... linking ... done.
...
Loading package hermit-1.0.0.0 ... linking ... done.
[2 of 2] Compiling Main ( Reverse.hs, Reverse.o )
Linking Reverse ...
$ ./Reverse
....
@
.
Example of interactive use.
.
@
$ hermit Reverse.hs
[starting HERMIT v1.0.0.0 on Reverse.hs]
% ghc Reverse.hs -fforce-recomp -O2 -dcore-lint -fexpose-all-unfoldings -fsimple-list-literals -fplugin=HERMIT -fplugin-opt=HERMIT:*:
[1 of 2] Compiling HList ( HList.hs, HList.o )
Loading package ghc-prim ... linking ... done.
...
Loading package hermit-1.0.0.0 ... linking ... done.
[2 of 2] Compiling Main ( Reverse.hs, Reverse.o )
===================== Welcome to HERMIT =====================
HERMIT is a toolkit for the interactive transformation of GHC
core language programs. Documentation on HERMIT can be found
on the HERMIT web page at:
http:\/\/www.ittc.ku.edu\/csdl\/fpg\/software\/hermit.html
.
You have just loaded the interactive shell. To exit, type
\"abort\" or \"resume\" to abort or resume GHC compilation.
.
Type \"help\" for instructions on how to list or search the
available HERMIT commands.
.
To get started, you could try the following:
\ \ - type \"binding-of 'foo\", where \"foo\" is a function
\ \ \ \ defined in the module;
\ \ - type \"set-pp-type Show\" to switch on typing information;
\ \ - use natural numbers such as \"0\" and \"1\" to descend into
\ \ \ \ the definition, and \"up\" to ascend;
\ \ - type \"info\" for more information about the current node;
\ \ - type \"log\" to display an activity log.
=============================================================
module main:Main where
\ \ rev ∷ ∀ a . [a] -> [a]
\ \ unwrap ∷ ∀ a . ([a] -> [a]) -> [a] -> H a
\ \ wrap ∷ ∀ a . ([a] -> H a) -> [a] -> [a]
\ \ main ∷ IO ()
\ \ main ∷ IO ()
hermit\<0\>
...
@
.
To resume compilation, use resume.
.
@
...
hermit\<0\> resume
hermit\<0\> Linking Reverse ...
$
@
category: Language, Formal Methods, Optimization, Transformation, Refactoring, Reflection
license: BSD3
license-file: LICENSE
author: Andrew Farmer, Andy Gill, Ed Komp, Neil Sculthorpe
maintainer: Andrew Farmer <[email protected]>
stability: beta
build-type: Simple
cabal-version: >= 1.14
extra-source-files:
README.md
examples/concatVanishes/ConcatVanishes.hss
examples/concatVanishes/Flatten.hs
examples/concatVanishes/Flatten.hss
examples/concatVanishes/HList.hs
examples/concatVanishes/QSort.hs
examples/concatVanishes/QSort.hss
examples/concatVanishes/Rev.hs
examples/concatVanishes/Rev.hss
examples/evaluation/Eval.hs
examples/evaluation/Eval.hss
examples/factorial/Fac.hs
examples/factorial/Fac.hss
examples/fib-stream/Fib.hs
examples/fib-stream/Fib.hss
examples/fib-stream/Nat.hs
examples/fib-stream/Stream.hs
examples/fib-tuple/Fib.hs
examples/fib-tuple/Fib.hss
examples/flatten/HList.hs
examples/flatten/Flatten.hs
examples/flatten/Flatten.hec
examples/hanoi/Hanoi.hs
examples/hanoi/Hanoi.hss
examples/last/Last.hs
examples/last/Last.hss
examples/last/NewLast.hss
examples/mean/Mean.hs
examples/mean/Mean.hss
examples/nub/Nub.hs
examples/nub/Nub.hss
examples/qsort/HList.hs
examples/qsort/QSort.hs
examples/qsort/QSort.hss
examples/reverse/HList.hs
examples/reverse/Reverse.hs
examples/reverse/Reverse.hss
examples/new_reverse/HList.hs
examples/new_reverse/Reverse.hs
examples/new_reverse/Reverse.hec
library
ghc-options: -Wall
build-depends: base >= 4.7 && < 5,
aeson >= 0.9,
ansi-terminal >= 0.5.5,
array,
base-compat >= 0.8.1,
containers >= 0.5.0.0,
data-default-class >= 0.0.1,
directory >= 1.2.0.0,
ghc >= 7.8 && <= 7.12,
haskeline >= 0.7.0.3,
kure >= 2.16.8,
marked-pretty >= 0.1,
mtl >= 2.1.2,
process >= 1.1.0.2,
stm >= 2.4,
temporary-rc >= 1.2.0.3,
terminal-size >= 0.3.2,
transformers >= 0.2,
transformers-compat >= 0.4
if os(windows)
build-depends: Win32
build-tools: alex >= 3.1.3,
happy >= 1.19.3
default-language: Haskell2010
exposed-modules: HERMIT
HERMIT.Context
HERMIT.Core
HERMIT.Dictionary
HERMIT.Driver
HERMIT.Dictionary.AlphaConversion
HERMIT.Dictionary.Common
HERMIT.Dictionary.Composite
HERMIT.Dictionary.Debug
HERMIT.Dictionary.FixPoint
HERMIT.Dictionary.Fold
HERMIT.Dictionary.Function
HERMIT.Dictionary.GHC
HERMIT.Dictionary.Induction
HERMIT.Dictionary.Inline
HERMIT.Dictionary.Kure
HERMIT.Dictionary.Local
HERMIT.Dictionary.Local.Bind
HERMIT.Dictionary.Local.Case
HERMIT.Dictionary.Local.Cast
HERMIT.Dictionary.Local.Let
HERMIT.Dictionary.Navigation
HERMIT.Dictionary.Navigation.Crumbs
HERMIT.Dictionary.New
HERMIT.Dictionary.Query
HERMIT.Dictionary.Reasoning
HERMIT.Dictionary.Remembered
HERMIT.Dictionary.Rules
HERMIT.Dictionary.Undefined
HERMIT.Dictionary.Unfold
HERMIT.Dictionary.Unsafe
HERMIT.Dictionary.WorkerWrapper.Common
HERMIT.Dictionary.WorkerWrapper.Fix
HERMIT.Dictionary.WorkerWrapper.FixResult
HERMIT.External
HERMIT.GHC
HERMIT.GHC.Typechecker
HERMIT.Kernel
HERMIT.Kure
HERMIT.Kure.Universes
HERMIT.Lemma
HERMIT.Monad
HERMIT.Name
HERMIT.Parser
HERMIT.ParserCore
HERMIT.ParserType
HERMIT.Plugin
HERMIT.Plugin.Builder
HERMIT.Plugin.Display
HERMIT.Plugin.Renderer
HERMIT.Plugin.Types
HERMIT.PrettyPrinter
HERMIT.PrettyPrinter.AST
HERMIT.PrettyPrinter.Clean
HERMIT.PrettyPrinter.Common
HERMIT.PrettyPrinter.GHC
HERMIT.Shell.Command
HERMIT.Shell.Completion
HERMIT.Shell.Dictionary
HERMIT.Shell.Interpreter
HERMIT.Shell.Externals
HERMIT.Shell.KernelEffect
HERMIT.Shell.ScriptToRewrite
HERMIT.Shell.ShellEffect
HERMIT.Shell.Proof
HERMIT.Shell.Types
HERMIT.Utilities
HERMIT.Libraries.Int
other-modules: HERMIT.Syntax
Paths_hermit
if os(windows)
other-modules: HERMIT.Win32.Console
HERMIT.Win32.IO
hs-source-dirs: src
executable hermit
build-depends: base >= 4.7 && < 5,
hermit
default-language: Haskell2010
main-is: Main.hs
hs-source-dirs: driver
ghc-options: -Wall
test-suite hermit-tests
type: exitcode-stdio-1.0
build-depends: base >= 4.7 && < 5,
base-compat >= 0.8.1,
directory >= 1.2,
filepath,
ghc-paths,
hermit,
process >= 1.1.0.2,
tasty >= 0.8,
tasty-golden >= 2.3,
temporary-rc >= 1.2.0.3
default-language: Haskell2010
main-is: Main.hs
hs-source-dirs: tests
ghc-options: -Wall
source-repository head
type: git
location: https://github.com/ku-fpg/hermit