-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathghc-typelits-natnormalise.cabal
116 lines (112 loc) · 3.77 KB
/
ghc-typelits-natnormalise.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
name: ghc-typelits-natnormalise
version: 0.7.10
synopsis: GHC typechecker plugin for types of kind GHC.TypeLits.Nat
description:
A type checker plugin for GHC that can solve /equalities/ and /inequalities/
of types of kind @Nat@, where these types are either:
.
* Type-level naturals
.
* Type variables
.
* Applications of the arithmetic expressions @(+,-,*,^)@.
.
It solves these equalities by normalising them to /sort-of/ @SOP@
(Sum-of-Products) form, and then perform a simple syntactic equality.
.
For example, this solver can prove the equality between:
.
@
(x + 2)^(y + 2)
@
.
and
.
@
4*x*(2 + x)^y + 4*(2 + x)^y + (2 + x)^y*x^2
@
.
Because the latter is actually the @SOP@ normal form of the former.
.
To use the plugin, add the
.
@
OPTIONS_GHC -fplugin GHC.TypeLits.Normalise
@
.
Pragma to the header of your file.
homepage: http://www.clash-lang.org/
bug-reports: http://github.com/clash-lang/ghc-typelits-natnormalise/issues
license: BSD2
license-file: LICENSE
author: Christiaan Baaij
maintainer: [email protected]
copyright: Copyright © 2015-2016, University of Twente,
2017-2018, QBayLogic B.V.
category: Type System
build-type: Simple
extra-source-files: README.md
CHANGELOG.md
cabal-version: >=1.10
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5,
GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8,
GHC == 9.4.7, GHC == 9.6.3, GHC == 9.8.2, GHC == 9.10.1
source-repository head
type: git
location: https://github.com/clash-lang/ghc-typelits-natnormalise.git
flag deverror
description:
Enables `-Werror` for development mode and TravisCI
default: False
manual: True
library
exposed-modules: GHC.TypeLits.Normalise,
GHC.TypeLits.Normalise.SOP,
GHC.TypeLits.Normalise.Unify
build-depends: base >=4.9 && <5,
containers >=0.5.7.1 && <0.8,
ghc >=8.0.1 && <9.12,
ghc-tcplugins-extra >=0.3.1,
transformers >=0.5.2.0 && < 0.7
if impl(ghc >= 9.0.0)
build-depends: ghc-bignum >=1.0 && <1.4
else
build-depends: integer-gmp >=1.0 && <1.1
hs-source-dirs: src
if impl(ghc >= 8.0) && impl(ghc < 9.4)
hs-source-dirs: src-pre-ghc-9.4
if impl(ghc >= 9.4) && impl(ghc < 9.12)
hs-source-dirs: src-ghc-9.4
build-depends: template-haskell >=2.17 && <2.23
default-language: Haskell2010
other-extensions: CPP
LambdaCase
RecordWildCards
TupleSections
if flag(deverror)
ghc-options: -Wall -Werror
else
ghc-options: -Wall
test-suite unit-tests
type: exitcode-stdio-1.0
main-is: Tests.hs
Other-Modules: ErrorTests
build-depends: base >=4.8 && <5,
ghc-typelits-natnormalise,
tasty >= 0.10,
tasty-hunit >= 0.9,
template-haskell >= 2.11.0.0
if impl(ghc >= 9.4)
build-depends: ghc-prim >= 0.9
hs-source-dirs: tests
default-language: Haskell2010
other-extensions: DataKinds
GADTs
KindSignatures
NoImplicitPrelude
TemplateHaskell
TypeFamilies
TypeOperators
ScopedTypeVariables
if flag(deverror)
ghc-options: -dcore-lint