File tree Expand file tree Collapse file tree 8 files changed +43
-37
lines changed Expand file tree Collapse file tree 8 files changed +43
-37
lines changed Original file line number Diff line number Diff line change 2
2
{-# LANGUAGE NoImplicitPrelude #-}
3
3
4
4
-- | This module implements quicksort with mutable arrays from linear-base
5
- module Simple.Quicksort ( quickSort ) where
5
+ module Simple.Quicksort where
6
6
7
7
import Data.Array.Mutable.Linear (Array )
8
8
import qualified Data.Array.Mutable.Linear as Array
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -145,6 +145,23 @@ library
145
145
vector >= 0.12.2 ,
146
146
primitive
147
147
148
+ library examples
149
+ import : build-opts
150
+ hs-source-dirs : examples
151
+ exposed-modules :
152
+ Foreign.List
153
+ Foreign.Heap
154
+ Simple.FileIO
155
+ Simple.Pure
156
+ Simple.Quicksort
157
+ Simple.TopSort
158
+ build-depends :
159
+ base,
160
+ linear-base,
161
+ storable-tuple,
162
+ vector,
163
+ text
164
+
148
165
test-suite test
149
166
import : build-opts
150
167
import : rts-opts-multithread
@@ -158,6 +175,7 @@ test-suite test
158
175
Test.Data.Mutable.HashMap
159
176
Test.Data.Mutable.Set
160
177
Test.Data.Polarized
178
+ Test.Data.Functor.Linear
161
179
Test.Data.V
162
180
Test.Data.Replicator
163
181
default-language : Haskell2010
@@ -171,38 +189,28 @@ test-suite test
171
189
tasty,
172
190
tasty-hedgehog >= 1.2 ,
173
191
mmorph,
174
- vector
192
+ vector,
193
+ linear-generics
175
194
176
- test-suite examples
195
+ test-suite test- examples
177
196
import : build-opts
178
197
import : rts-opts-multithread
179
198
type : exitcode-stdio-1.0
180
199
main-is : Main.hs
181
- hs-source-dirs : examples
200
+ hs-source-dirs : test- examples
182
201
other-modules :
183
202
Test.Foreign
184
- Test.Quicksort
185
- Test.Generic
186
- Foreign.List
187
- Foreign.Heap
188
- Simple.FileIO
189
- Simple.Pure
190
- Simple.Quicksort
191
- Simple.TopSort
192
- Generic.Traverse
203
+ Test.Simple.Quicksort
193
204
default-language : Haskell2010
194
205
build-depends :
195
206
base,
196
207
linear-base,
197
208
tasty,
198
209
tasty-hedgehog,
199
210
hedgehog,
200
- storable-tuple,
201
- vector,
202
- text,
203
- linear-generics
211
+ examples
204
212
205
- benchmark mutable-data
213
+ benchmark bench
206
214
import : build-opts
207
215
import : rts-opts-monothread
208
216
type : exitcode-stdio-1.0
@@ -224,4 +232,5 @@ benchmark mutable-data
224
232
random-shuffle,
225
233
tasty-bench >= 0.3 ,
226
234
unordered-containers,
227
- MonadRandom
235
+ MonadRandom,
236
+ examples
Original file line number Diff line number Diff line change 1
1
module Main where
2
2
3
3
import Test.Foreign (foreignGCTests )
4
- import Test.Generic (genericTests )
5
- import Test.Quicksort (quickSortTests )
4
+ import Test.Simple.Quicksort (quickSortTests )
6
5
import Test.Tasty
7
6
8
7
main :: IO ()
@@ -13,6 +12,5 @@ allTests =
13
12
testGroup
14
13
" All tests"
15
14
[ foreignGCTests,
16
- quickSortTests,
17
- genericTests
15
+ quickSortTests
18
16
]
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE OverloadedStrings #-}
2
2
3
- module Test.Quicksort (quickSortTests ) where
3
+ module Test.Simple. Quicksort (quickSortTests ) where
4
4
5
5
import Data.List (sort )
6
6
import Hedgehog
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Test.Data.Mutable.HashMap (mutHMTests)
9
9
import Test.Data.Mutable.Set (mutSetTests )
10
10
import Test.Data.Mutable.Vector (mutVecTests )
11
11
import Test.Data.Polarized (polarizedArrayTests )
12
+ import Test.Data.Functor.Linear (genericTests )
12
13
import Test.Data.Replicator (replicatorInspectionTests )
13
14
import Test.Data.V (vInspectionTests )
14
15
import Test.Tasty
@@ -27,7 +28,8 @@ allTests =
27
28
mutHMTests,
28
29
mutSetTests,
29
30
destArrayTests,
30
- polarizedArrayTests
31
+ polarizedArrayTests,
32
+ genericTests
31
33
],
32
34
testGroup
33
35
" Inspection tests"
Original file line number Diff line number Diff line change 10
10
{-# LANGUAGE TypeFamilies #-}
11
11
{-# LANGUAGE NoImplicitPrelude #-}
12
12
13
- module Generic.Traverse ( genericTraverseTests ) where
13
+ module Test.Data.Functor.Linear ( genericTests ) where
14
14
15
15
import Data.Functor.Linear (genericTraverse )
16
16
import qualified Data.Functor.Linear as Data
@@ -32,6 +32,13 @@ instance Data.Functor Pair where
32
32
instance Data. Traversable Pair where
33
33
traverse = genericTraverse
34
34
35
+ genericTests :: TestTree
36
+ genericTests =
37
+ testGroup
38
+ " Generic tests"
39
+ [ genericTraverseTests
40
+ ]
41
+
35
42
genericTraverseTests :: TestTree
36
43
genericTraverseTests =
37
44
testGroup
@@ -50,3 +57,4 @@ propertyPairTest =
50
57
(MkPair 3 4 :: Pair Int )
51
58
)
52
59
=== (Sum 2 , (MkPair 6 8 ))
60
+
You can’t perform that action at this time.
0 commit comments