Skip to content

Commit 428bd8f

Browse files
committed
Update module names in the code
1 parent d706ced commit 428bd8f

File tree

11 files changed

+35
-35
lines changed

11 files changed

+35
-35
lines changed

Data/HashMap/Internal.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#endif
1212
{-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-}
1313

14-
module Data.HashMap.Base
14+
module Data.HashMap.Internal
1515
(
1616
HashMap(..)
1717
, Leaf(..)
@@ -140,11 +140,11 @@ import GHC.Exts ((==#), build, reallyUnsafePtrEquality#)
140140
import Prelude hiding (filter, foldl, foldr, lookup, map, null, pred)
141141
import Text.Read hiding (step)
142142

143-
import qualified Data.HashMap.Array as A
143+
import qualified Data.HashMap.Internal.Array as A
144144
import qualified Data.Hashable as H
145145
import Data.Hashable (Hashable)
146-
import Data.HashMap.Unsafe (runST)
147-
import Data.HashMap.List (isPermutationBy, unorderedCompare)
146+
import Data.HashMap.Internal.Unsafe (runST)
147+
import Data.HashMap.Internal.List (isPermutationBy, unorderedCompare)
148148
import Data.Typeable (Typeable)
149149

150150
import GHC.Exts (isTrue#)
@@ -283,7 +283,7 @@ fromListConstr :: Constr
283283
fromListConstr = mkConstr hashMapDataType "fromList" [] Prefix
284284

285285
hashMapDataType :: DataType
286-
hashMapDataType = mkDataType "Data.HashMap.Base.HashMap" [fromListConstr]
286+
hashMapDataType = mkDataType "Data.HashMap.Internal.HashMap" [fromListConstr]
287287

288288
type Hash = Word
289289
type Bitmap = Word
@@ -729,7 +729,7 @@ lookupDefault def k t = findWithDefault def k t
729729
#endif
730730
(!) m k = case lookup k m of
731731
Just v -> v
732-
Nothing -> error "Data.HashMap.Base.(!): key not found"
732+
Nothing -> error "Data.HashMap.Internal.(!): key not found"
733733
{-# INLINABLE (!) #-}
734734

735735
infixl 9 !

Data/HashMap/Internal/Array.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- | Zero based arrays.
55
--
66
-- Note that no bounds checking are performed.
7-
module Data.HashMap.Array
7+
module Data.HashMap.Internal.Array
88
( Array
99
, MArray
1010

@@ -88,7 +88,7 @@ import Data.Monoid (Monoid (..))
8888
import qualified Prelude
8989
#endif
9090

91-
import Data.HashMap.Unsafe (runST)
91+
import Data.HashMap.Internal.Unsafe (runST)
9292
import Control.Monad ((>=>))
9393

9494

@@ -163,9 +163,9 @@ copyMutableArray# = copySmallMutableArray#
163163
-- This fugly hack is brought by GHC's apparent reluctance to deal
164164
-- with MagicHash and UnboxedTuples when inferring types. Eek!
165165
# define CHECK_BOUNDS(_func_,_len_,_k_) \
166-
if (_k_) < 0 || (_k_) >= (_len_) then error ("Data.HashMap.Array." ++ (_func_) ++ ": bounds error, offset " ++ show (_k_) ++ ", length " ++ show (_len_)) else
166+
if (_k_) < 0 || (_k_) >= (_len_) then error ("Data.HashMap.Internal.Array." ++ (_func_) ++ ": bounds error, offset " ++ show (_k_) ++ ", length " ++ show (_len_)) else
167167
# define CHECK_OP(_func_,_op_,_lhs_,_rhs_) \
168-
if not ((_lhs_) _op_ (_rhs_)) then error ("Data.HashMap.Array." ++ (_func_) ++ ": Check failed: _lhs_ _op_ _rhs_ (" ++ show (_lhs_) ++ " vs. " ++ show (_rhs_) ++ ")") else
168+
if not ((_lhs_) _op_ (_rhs_)) then error ("Data.HashMap.Internal.Array." ++ (_func_) ++ ": Check failed: _lhs_ _op_ _rhs_ (" ++ show (_lhs_) ++ " vs. " ++ show (_rhs_) ++ ")") else
169169
# define CHECK_GT(_func_,_lhs_,_rhs_) CHECK_OP(_func_,>,_lhs_,_rhs_)
170170
# define CHECK_LE(_func_,_lhs_,_rhs_) CHECK_OP(_func_,<=,_lhs_,_rhs_)
171171
# define CHECK_EQ(_func_,_lhs_,_rhs_) CHECK_OP(_func_,==,_lhs_,_rhs_)
@@ -448,7 +448,7 @@ foldMap f = \ary0 -> case length ary0 of
448448
{-# INLINE foldMap #-}
449449

450450
undefinedElem :: a
451-
undefinedElem = error "Data.HashMap.Array: Undefined element"
451+
undefinedElem = error "Data.HashMap.Internal.Array: Undefined element"
452452
{-# NOINLINE undefinedElem #-}
453453

454454
thaw :: Array e -> Int -> Int -> ST s (MArray s e)

Data/HashMap/Internal/List.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- | Extra list functions
44
--
55
-- In separate module to aid testing.
6-
module Data.HashMap.List
6+
module Data.HashMap.Internal.List
77
( isPermutationBy
88
, deleteBy
99
, unorderedCompare

Data/HashMap/Internal/Strict.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
-- Many operations have a average-case complexity of /O(log n)/. The
2424
-- implementation uses a large base (i.e. 16) so in practice these
2525
-- operations are constant time.
26-
module Data.HashMap.Strict.Base
26+
module Data.HashMap.Internal.Strict
2727
(
2828
-- * Strictness properties
2929
-- $strictness
@@ -107,15 +107,15 @@ import qualified Data.List as L
107107
import Data.Hashable (Hashable)
108108
import Prelude hiding (map, lookup)
109109

110-
import qualified Data.HashMap.Array as A
111-
import qualified Data.HashMap.Base as HM
112-
import Data.HashMap.Base hiding (
110+
import qualified Data.HashMap.Internal.Array as A
111+
import qualified Data.HashMap.Internal as HM
112+
import Data.HashMap.Internal hiding (
113113
alter, alterF, adjust, fromList, fromListWith, fromListWithKey,
114114
insert, insertWith,
115115
differenceWith, intersectionWith, intersectionWithKey, map, mapWithKey,
116116
mapMaybe, mapMaybeWithKey, singleton, update, unionWith, unionWithKey,
117117
traverseWithKey)
118-
import Data.HashMap.Unsafe (runST)
118+
import Data.HashMap.Internal.Unsafe (runST)
119119
#if MIN_VERSION_base(4,8,0)
120120
import Data.Functor.Identity
121121
#endif
@@ -310,7 +310,7 @@ alterF f = \ !k !m ->
310310
{-# INLINABLE [0] alterF #-}
311311

312312
#if MIN_VERSION_base(4,8,0)
313-
-- See notes in Data.HashMap.Base
313+
-- See notes in Data.HashMap.Internal
314314
test_bottom :: a
315315
test_bottom = error "Data.HashMap.alterF internal error: hit test_bottom"
316316

@@ -322,7 +322,7 @@ impossibleAdjust = error "Data.HashMap.alterF internal error: impossible adjust"
322322

323323
{-# RULES
324324

325-
-- See detailed notes on alterF rules in Data.HashMap.Base.
325+
-- See detailed notes on alterF rules in Data.HashMap.Internal.
326326

327327
"alterFWeird" forall f. alterF f =
328328
alterFWeird (f Nothing) (f (Just test_bottom)) f

Data/HashMap/Internal/Unsafe.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-- understand what's going on here.
1313
--
1414
-- Code that uses this module should be compiled with -fno-full-laziness
15-
module Data.HashMap.Unsafe
15+
module Data.HashMap.Internal.Unsafe
1616
( runST
1717
) where
1818

Data/HashMap/Lazy.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ module Data.HashMap.Lazy
100100
, HS.keysSet
101101
) where
102102

103-
import Data.HashMap.Base as HM
104-
import qualified Data.HashSet.Base as HS
103+
import Data.HashMap.Internal as HM
104+
import qualified Data.HashSet.Internal as HS
105105
import Prelude ()
106106

107107
-- $strictness

Data/HashMap/Strict.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ module Data.HashMap.Strict
9999
, HS.keysSet
100100
) where
101101

102-
import Data.HashMap.Strict.Base as HM
103-
import qualified Data.HashSet.Base as HS
102+
import Data.HashMap.Internal.Strict as HM
103+
import qualified Data.HashSet.Internal as HS
104104
import Prelude ()
105105

106106
-- $strictness

Data/HashSet.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ module Data.HashSet
6868
, fromMap
6969
) where
7070

71-
import Data.HashSet.Base
71+
import Data.HashSet.Internal
7272
import Prelude ()

Data/HashSet/Internal.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
------------------------------------------------------------------------
1111
-- |
12-
-- Module : Data.HashSet.Base
12+
-- Module : Data.HashSet.Internal
1313
-- Copyright : 2011 Bryan O'Sullivan
1414
-- License : BSD-style
1515
-- Maintainer : [email protected]
@@ -28,7 +28,7 @@
2828
-- implementation uses a large base (i.e. 16) so in practice these
2929
-- operations are constant time.
3030

31-
module Data.HashSet.Base
31+
module Data.HashSet.Internal
3232
(
3333
HashSet
3434

@@ -79,7 +79,7 @@ module Data.HashSet.Base
7979

8080
import Control.DeepSeq (NFData(..))
8181
import Data.Data hiding (Typeable)
82-
import Data.HashMap.Base
82+
import Data.HashMap.Internal
8383
( HashMap, foldMapWithKey, foldlWithKey, foldrWithKey
8484
, equalKeys, equalKeys1)
8585
import Data.Hashable (Hashable(hashWithSalt))
@@ -91,7 +91,7 @@ import Data.Monoid (Monoid(..))
9191
import GHC.Exts (build)
9292
import Prelude hiding (filter, foldr, foldl, map, null)
9393
import qualified Data.Foldable as Foldable
94-
import qualified Data.HashMap.Base as H
94+
import qualified Data.HashMap.Internal as H
9595
import qualified Data.List as List
9696
import Data.Typeable (Typeable)
9797
import Text.Read
@@ -257,7 +257,7 @@ fromListConstr :: Constr
257257
fromListConstr = mkConstr hashSetDataType "fromList" [] Prefix
258258

259259
hashSetDataType :: DataType
260-
hashSetDataType = mkDataType "Data.HashSet.Base.HashSet" [fromListConstr]
260+
hashSetDataType = mkDataType "Data.HashSet.Internal.HashSet" [fromListConstr]
261261

262262
-- | /O(1)/ Construct an empty set.
263263
empty :: HashSet a

tests/List.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Main (main) where
22

3-
import Data.HashMap.List
3+
import Data.HashMap.Internal.List
44
import Data.List (nub, sort, sortBy)
55
import Data.Ord (comparing)
66

@@ -9,7 +9,7 @@ import Test.Framework.Providers.QuickCheck2 (testProperty)
99
import Test.QuickCheck ((==>), (===), property, Property)
1010

1111
tests :: Test
12-
tests = testGroup "Data.HashMap.List"
12+
tests = testGroup "Data.HashMap.Internal.List"
1313
[ testProperty "isPermutationBy" pIsPermutation
1414
, testProperty "isPermutationBy of different length" pIsPermutationDiffLength
1515
, testProperty "pUnorderedCompare" pUnorderedCompare

0 commit comments

Comments
 (0)