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 22{-# LANGUAGE NoImplicitPrelude #-}
33
44-- | This module implements quicksort with mutable arrays from linear-base
5- module Simple.Quicksort ( quickSort ) where
5+ module Simple.Quicksort where
66
77import Data.Array.Mutable.Linear (Array )
88import 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
145145 vector >= 0.12.2 ,
146146 primitive
147147
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+
148165test-suite test
149166 import : build-opts
150167 import : rts-opts-multithread
@@ -158,6 +175,7 @@ test-suite test
158175 Test.Data.Mutable.HashMap
159176 Test.Data.Mutable.Set
160177 Test.Data.Polarized
178+ Test.Data.Functor.Linear
161179 Test.Data.V
162180 Test.Data.Replicator
163181 default-language : Haskell2010
@@ -171,38 +189,28 @@ test-suite test
171189 tasty,
172190 tasty-hedgehog >= 1.2 ,
173191 mmorph,
174- vector
192+ vector,
193+ linear-generics
175194
176- test-suite examples
195+ test-suite test- examples
177196 import : build-opts
178197 import : rts-opts-multithread
179198 type : exitcode-stdio-1.0
180199 main-is : Main.hs
181- hs-source-dirs : examples
200+ hs-source-dirs : test- examples
182201 other-modules :
183202 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
193204 default-language : Haskell2010
194205 build-depends :
195206 base,
196207 linear-base,
197208 tasty,
198209 tasty-hedgehog,
199210 hedgehog,
200- storable-tuple,
201- vector,
202- text,
203- linear-generics
211+ examples
204212
205- benchmark mutable-data
213+ benchmark bench
206214 import : build-opts
207215 import : rts-opts-monothread-stats
208216 type : exitcode-stdio-1.0
@@ -224,4 +232,5 @@ benchmark mutable-data
224232 random-shuffle,
225233 tasty-bench >= 0.3 ,
226234 unordered-containers,
227- MonadRandom
235+ MonadRandom,
236+ examples
Original file line number Diff line number Diff line change 11module Main where
22
33import Test.Foreign (foreignGCTests )
4- import Test.Generic (genericTests )
5- import Test.Quicksort (quickSortTests )
4+ import Test.Simple.Quicksort (quickSortTests )
65import Test.Tasty
76
87main :: IO ()
@@ -13,6 +12,5 @@ allTests =
1312 testGroup
1413 " All tests"
1514 [ foreignGCTests,
16- quickSortTests,
17- genericTests
15+ quickSortTests
1816 ]
File renamed without changes.
Original file line number Diff line number Diff line change 11{-# LANGUAGE OverloadedStrings #-}
22
3- module Test.Quicksort (quickSortTests ) where
3+ module Test.Simple. Quicksort (quickSortTests ) where
44
55import Data.List (sort )
66import Hedgehog
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Test.Data.Mutable.HashMap (mutHMTests)
99import Test.Data.Mutable.Set (mutSetTests )
1010import Test.Data.Mutable.Vector (mutVecTests )
1111import Test.Data.Polarized (polarizedArrayTests )
12+ import Test.Data.Functor.Linear (genericTests )
1213import Test.Data.Replicator (replicatorInspectionTests )
1314import Test.Data.V (vInspectionTests )
1415import Test.Tasty
@@ -27,7 +28,8 @@ allTests =
2728 mutHMTests,
2829 mutSetTests,
2930 destArrayTests,
30- polarizedArrayTests
31+ polarizedArrayTests,
32+ genericTests
3133 ],
3234 testGroup
3335 " Inspection tests"
Original file line number Diff line number Diff line change 1010{-# LANGUAGE TypeFamilies #-}
1111{-# LANGUAGE NoImplicitPrelude #-}
1212
13- module Generic.Traverse ( genericTraverseTests ) where
13+ module Test.Data.Functor.Linear ( genericTests ) where
1414
1515import Data.Functor.Linear (genericTraverse )
1616import qualified Data.Functor.Linear as Data
@@ -32,6 +32,13 @@ instance Data.Functor Pair where
3232instance Data. Traversable Pair where
3333 traverse = genericTraverse
3434
35+ genericTests :: TestTree
36+ genericTests =
37+ testGroup
38+ " Generic tests"
39+ [ genericTraverseTests
40+ ]
41+
3542genericTraverseTests :: TestTree
3643genericTraverseTests =
3744 testGroup
@@ -50,3 +57,4 @@ propertyPairTest =
5057 (MkPair 3 4 :: Pair Int )
5158 )
5259 === (Sum 2 , (MkPair 6 8 ))
60+
You can’t perform that action at this time.
0 commit comments