diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2017-01-30 20:48:22 +0000 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2017-01-30 20:48:22 +0000 |
commit | 5295259c77f4fc719399f4ca5744382790464cc7 (patch) | |
tree | a624eb424b79bb5ddba05f8dc02bdd0d6a648e7d | |
parent | 3c00654473d7ad225ee984f58bbc24bceb11278d (diff) |
require newer (>= 5.1) megaparsec since it has the Arbitrary instances for Pos and SourcePos
-rw-r--r-- | lambdacube-compiler.cabal | 10 | ||||
-rw-r--r-- | test/UnitTests.hs | 9 |
2 files changed, 5 insertions, 14 deletions
diff --git a/lambdacube-compiler.cabal b/lambdacube-compiler.cabal index fae1b941..31b071b3 100644 --- a/lambdacube-compiler.cabal +++ b/lambdacube-compiler.cabal | |||
@@ -2,7 +2,7 @@ | |||
2 | -- documentation, see http://haskell.org/cabal/users-guide/ | 2 | -- documentation, see http://haskell.org/cabal/users-guide/ |
3 | 3 | ||
4 | name: lambdacube-compiler | 4 | name: lambdacube-compiler |
5 | version: 0.6.0.1 | 5 | version: 0.6.1.0 |
6 | homepage: http://lambdacube3d.com | 6 | homepage: http://lambdacube3d.com |
7 | synopsis: LambdaCube 3D is a DSL to program GPUs | 7 | synopsis: LambdaCube 3D is a DSL to program GPUs |
8 | description: LambdaCube 3D is a domain specific language and library that makes it | 8 | description: LambdaCube 3D is a domain specific language and library that makes it |
@@ -101,7 +101,7 @@ library | |||
101 | exceptions >= 0.8 && <0.9, | 101 | exceptions >= 0.8 && <0.9, |
102 | filepath >=1.4 && <1.5, | 102 | filepath >=1.4 && <1.5, |
103 | mtl >=2.2 && <2.3, | 103 | mtl >=2.2 && <2.3, |
104 | megaparsec >=5.0 && <5.2, | 104 | megaparsec >=5.1 && <5.2, |
105 | ansi-wl-pprint >=0.6 && <0.7, | 105 | ansi-wl-pprint >=0.6 && <0.7, |
106 | pretty-show >= 1.6.9, | 106 | pretty-show >= 1.6.9, |
107 | text >= 1.2 && <1.3, | 107 | text >= 1.2 && <1.3, |
@@ -153,7 +153,7 @@ executable lambdacube-compiler-unit-tests | |||
153 | semigroups, | 153 | semigroups, |
154 | containers >=0.5 && <0.6, | 154 | containers >=0.5 && <0.6, |
155 | lambdacube-compiler, | 155 | lambdacube-compiler, |
156 | megaparsec >=5.0 && <5.2, | 156 | megaparsec >=5.1 && <5.2, |
157 | QuickCheck >= 2.8.2 && <2.10, | 157 | QuickCheck >= 2.8.2 && <2.10, |
158 | tasty >= 0.11 && <0.12, | 158 | tasty >= 0.11 && <0.12, |
159 | tasty-quickcheck >=0.8 && <0.9 | 159 | tasty-quickcheck >=0.8 && <0.9 |
@@ -188,7 +188,7 @@ executable lambdacube-compiler-test-suite | |||
188 | mtl >=2.2 && <2.3, | 188 | mtl >=2.2 && <2.3, |
189 | monad-control >= 1.0 && <1.1, | 189 | monad-control >= 1.0 && <1.1, |
190 | optparse-applicative >=0.12 && <0.14, | 190 | optparse-applicative >=0.12 && <0.14, |
191 | megaparsec >=5.0 && <5.2, | 191 | megaparsec >=5.1 && <5.2, |
192 | ansi-wl-pprint >=0.6 && <0.7, | 192 | ansi-wl-pprint >=0.6 && <0.7, |
193 | patience >= 0.1 && < 0.2, | 193 | patience >= 0.1 && < 0.2, |
194 | text >= 1.2 && <1.3, | 194 | text >= 1.2 && <1.3, |
@@ -277,7 +277,7 @@ executable lambdacube-compiler-coverage-test-suite | |||
277 | mtl >=2.2 && <2.3, | 277 | mtl >=2.2 && <2.3, |
278 | monad-control >= 1.0 && <1.1, | 278 | monad-control >= 1.0 && <1.1, |
279 | optparse-applicative >=0.12 && <0.14, | 279 | optparse-applicative >=0.12 && <0.14, |
280 | megaparsec >=5.0 && <5.2, | 280 | megaparsec >=5.1 && <5.2, |
281 | ansi-wl-pprint >=0.6 && <0.7, | 281 | ansi-wl-pprint >=0.6 && <0.7, |
282 | pretty-show >= 1.6.9, | 282 | pretty-show >= 1.6.9, |
283 | patience >= 0.1 && < 0.2, | 283 | patience >= 0.1 && < 0.2, |
diff --git a/test/UnitTests.hs b/test/UnitTests.hs index 52569f48..ae3fcaf4 100644 --- a/test/UnitTests.hs +++ b/test/UnitTests.hs | |||
@@ -28,15 +28,6 @@ main = defaultMain $ testGroup "Compiler" | |||
28 | ----------------------------------------------------------------- Arbitraries | 28 | ----------------------------------------------------------------- Arbitraries |
29 | 29 | ||
30 | -- SourcePos | 30 | -- SourcePos |
31 | instance Arbitrary Pos where | ||
32 | arbitrary = unsafePos . getPositive <$> arbitrary | ||
33 | |||
34 | instance Arbitrary SourcePos where | ||
35 | arbitrary = SourcePos <$> arbitrary <*> arbitrary <*> arbitrary | ||
36 | shrink pos | ||
37 | | n <- sourceName pos, l <- sourceLine pos, c <- sourceColumn pos | ||
38 | = [SourcePos n' l' c' | n' <- shrink n, l' <- shrink l, c' <- shrink c] | ||
39 | -- TODO: Diagonalize shrink | ||
40 | 31 | ||
41 | -- TODO: generate only valid positions | 32 | -- TODO: generate only valid positions |
42 | instance Arbitrary SPos where | 33 | instance Arbitrary SPos where |