-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconst-math-ghc-plugin.cabal
77 lines (70 loc) · 2.19 KB
/
const-math-ghc-plugin.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
name: const-math-ghc-plugin
version: 1.0.0.0
synopsis: Compiler plugin for constant math elimination
description:
This plugin evaluates constant math expressions at compile-time.
.
For details and full usage information, see;
.
<https://github.com/kfish/const-math-ghc-plugin>
.
To use it to compile /foo.hs/:
.
@
$ cabal install const-math-ghc-plugin
$ ghc -fplugin ConstMath.Plugin foo.hs
@
.
To use it to build a cabal package /packagename/:
.
@
$ cabal install --ghc-options="-package const-math-ghc-plugin -fplugin ConstMath.Plugin" packagename
@
.
Math should run faster.
.
license: BSD3
license-file: LICENSE
author: Conrad Parker, John Lato
maintainer: Conrad Parker <[email protected]>
-- copyright:
category: Compiler Plugin
homepage: https://github.com/kfish/const-math-ghc-plugin
build-type: Simple
cabal-version: >=1.8
-- tests/*.hs shouldn't have to go here, but the source files
-- for the test-suite stanzas don't get picked up by 'cabal sdist'.
Extra-source-files:
tests/Make.hs
tests/Makefile
tests/cmpoutput.mak
tests/ghc-7.4/*.hs
tests/ghc-7.4/Makefile
tests/ghc-7.6/*.hs
tests/ghc-7.6/Makefile
library
exposed-modules: ConstMath.Plugin
other-modules: ConstMath.Pass
ConstMath.PrimRules
ConstMath.Types
-- get the appropriate PrimRules list for this ghc version
if impl(ghc == 7.4.*)
other-modules: ConstMath.PrimRules.V704
if impl(ghc == 7.6.*)
other-modules: ConstMath.PrimRules.V706
build-depends: base < 5,
containers,
ghc >= 7.4
Test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Make.hs
build-depends: base < 5,
directory,
process
------------------------------------------------------------------------
-- Git repo
--
source-repository head
type: git
location: git://github.com/kfish/const-math-ghc-plugin.git