File tree Expand file tree Collapse file tree 17 files changed +42
-40
lines changed Expand file tree Collapse file tree 17 files changed +42
-40
lines changed Original file line number Diff line number Diff line change 1111-- land in a file named “Array.dump-simpl”
1212-- {-# OPTIONS_GHC -ddump-simpl -ddump-to-file -dsuppress-all -dsuppress-uniques #-}
1313
14- module Data.Mutable. Array (benchmarks ) where
14+ module Bench. Data.Array.Mutable (benchmarks ) where
1515
1616import Control.DeepSeq (rnf )
1717import qualified Data.Array.Mutable.Linear as Array.Linear
Original file line number Diff line number Diff line change 11{-# LANGUAGE NumericUnderscores #-}
22
3- module Data.Mutable.Quicksort (benchmarks ) where
3+ module Bench. Data.Array .Mutable.Quicksort (benchmarks ) where
44
55import Control.DeepSeq (force )
66import Control.Exception (evaluate )
7+ import Data.Array.Mutable.Quicksort (quicksortUsingArray , quicksortUsingList )
78import Data.List (sort )
8- import Simple.Quicksort (quicksortUsingArray , quicksortUsingList )
99import System.Random
1010import Test.Tasty.Bench
1111
Original file line number Diff line number Diff line change 1111{-# LANGUAGE StandaloneDeriving #-}
1212{-# LANGUAGE TupleSections #-}
1313
14- module Data.Mutable. HashMap (benchmarks ) where
14+ module Bench. Data.HashMap.Mutable (benchmarks ) where
1515
1616import Control.DeepSeq (NFData (.. ), deepseq , force )
1717import qualified Control.Monad.Random as Random
Original file line number Diff line number Diff line change 11module Main where
22
3- import qualified Data.Mutable. Array as Array
4- import qualified Data.Mutable.HashMap as HashMap
5- import qualified Data.Mutable.Quicksort as Quicksort
3+ import qualified Bench. Data.Array.Mutable as Array
4+ import qualified Bench. Data.Array. Mutable.Quicksort as Quicksort
5+ import qualified Bench. Data.HashMap.Mutable as HashMap
66import Test.Tasty.Bench (defaultMain )
77
88main :: IO ()
99main = do
1010 defaultMain
1111 [ Array. benchmarks,
12- HashMap . benchmarks,
13- Quicksort . benchmarks
12+ Quicksort . benchmarks,
13+ HashMap . benchmarks
1414 ]
Original file line number Diff line number Diff line change 66-- {-# OPTIONS_GHC -ddump-simpl -ddump-to-file -dsuppress-all -dsuppress-uniques #-}
77
88-- | This module implements quicksort with mutable arrays from linear-base
9- module Simple .Quicksort where
9+ module Data.Array.Mutable .Quicksort where
1010
1111import Data.Array.Mutable.Linear (Array )
1212import qualified Data.Array.Mutable.Linear as Array
Original file line number Diff line number Diff line change 55{-# OPTIONS_GHC -Wno-name-shadowing #-}
66{-# OPTIONS_GHC -Wno-unused-matches #-}
77
8- module Simple .TopSort where
8+ module Data.HashMap.Mutable .TopSort where
99
1010import Data.Bifunctor.Linear (second )
1111import qualified Data.Functor.Linear as Data
Original file line number Diff line number Diff line change 11# Examples
22
3+ * ` Data `
4+ * These are examples of using the pure linear interface of mutable
5+ data structures provided by linear base.
36 * ` Simple `
47 * These are tutorial level examples for understanding linear
58 types and using bread-and-butter tools in linear base.
69 * Recommended order: ` Pure ` , ` FileIO ` .
710 * ` Foreign `
811 * These are examples of explicitly allocating off the GC heap's
9- memory and on the system heap's memory
10-
12+ memory and on the system heap's memory.
Original file line number Diff line number Diff line change @@ -153,8 +153,8 @@ library examples
153153 Foreign.Heap
154154 Simple.FileIO
155155 Simple.Pure
156- Simple .Quicksort
157- Simple .TopSort
156+ Data.Array.Mutable .Quicksort
157+ Data.HashMap.Mutable .TopSort
158158 build-depends :
159159 base,
160160 linear-base,
@@ -169,12 +169,12 @@ test-suite test
169169 main-is : Main.hs
170170 hs-source-dirs : test
171171 other-modules :
172- Test.Data.Destination
173- Test.Data.Mutable. Array
174- Test.Data.Mutable. Vector
175- Test.Data.Mutable. HashMap
176- Test.Data.Mutable. Set
177- Test.Data.Polarized
172+ Test.Data.Array. Destination
173+ Test.Data.Array.Mutable
174+ Test.Data.Vector.Mutable
175+ Test.Data.HashMap.Mutable
176+ Test.Data.Set.Mutable
177+ Test.Data.Array. Polarized
178178 Test.Data.Functor.Linear
179179 Test.Data.V
180180 Test.Data.Replicator
@@ -200,7 +200,7 @@ test-suite test-examples
200200 hs-source-dirs : test-examples
201201 other-modules :
202202 Test.Foreign
203- Test.Simple .Quicksort
203+ Test.Data.Array.Mutable .Quicksort
204204 default-language : Haskell2010
205205 build-depends :
206206 base,
@@ -217,9 +217,9 @@ benchmark bench
217217 main-is : Main.hs
218218 hs-source-dirs : bench
219219 other-modules :
220- Data.Mutable. HashMap
221- Data.Mutable. Array
222- Data.Mutable.Quicksort
220+ Bench. Data.HashMap.Mutable
221+ Bench. Data.Array.Mutable
222+ Bench. Data.Array .Mutable.Quicksort
223223 default-language : Haskell2010
224224 build-depends :
225225 base,
Original file line number Diff line number Diff line change 11module Main where
22
3+ import Test.Data.Array.Mutable.Quicksort (quicksortTests )
34import Test.Foreign (foreignGCTests )
4- import Test.Simple.Quicksort (quicksortTests )
55import Test.Tasty
66
77main :: IO ()
Original file line number Diff line number Diff line change 11{-# LANGUAGE OverloadedStrings #-}
22
3- module Test.Simple .Quicksort (quicksortTests ) where
3+ module Test.Data.Array.Mutable .Quicksort (quicksortTests ) where
44
5+ import Data.Array.Mutable.Quicksort (quicksortUsingArray , quicksortUsingList )
56import Data.List (sort )
67import Hedgehog
78import qualified Hedgehog.Gen as Gen
89import qualified Hedgehog.Range as Range
9- import Simple.Quicksort (quicksortUsingArray , quicksortUsingList )
1010import Test.Tasty
1111import Test.Tasty.Hedgehog (testPropertyNamed )
1212
You can’t perform that action at this time.
0 commit comments