Skip to content

Commit b135447

Browse files
committed
Format long import lists more compactly
1 parent 0604e25 commit b135447

File tree

6 files changed

+28
-94
lines changed

6 files changed

+28
-94
lines changed

.stylish-haskell.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ steps:
22
- imports:
33
align: group
44
pad_module_names: true
5-
long_list_align: multiline
5+
long_list_align: inline
66
- language_pragmas:
77
align: true
88
remove_redundant: true

Data/HashMap/Internal.hs

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -144,41 +144,21 @@ import Control.Applicative (Const (..))
144144
import Control.DeepSeq (NFData (..), NFData1 (..), NFData2 (..))
145145
import Control.Monad.ST (ST, runST)
146146
import Data.Bifoldable (Bifoldable (..))
147-
import Data.Bits
148-
( complement
149-
, popCount
150-
, unsafeShiftL
151-
, unsafeShiftR
152-
, (.&.)
153-
, (.|.)
154-
)
147+
import Data.Bits (complement, popCount, unsafeShiftL,
148+
unsafeShiftR, (.&.), (.|.))
155149
import Data.Coerce (coerce)
156150
import Data.Data (Constr, Data (..), DataType)
157-
import Data.Functor.Classes
158-
( Eq1 (..)
159-
, Eq2 (..)
160-
, Ord1 (..)
161-
, Ord2 (..)
162-
, Read1 (..)
163-
, Show1 (..)
164-
, Show2 (..)
165-
)
151+
import Data.Functor.Classes (Eq1 (..), Eq2 (..), Ord1 (..), Ord2 (..),
152+
Read1 (..), Show1 (..), Show2 (..))
166153
import Data.Functor.Identity (Identity (..))
167154
import Data.HashMap.Internal.List (isPermutationBy, unorderedCompare)
168155
import Data.Hashable (Hashable)
169156
import Data.Hashable.Lifted (Hashable1, Hashable2)
170157
import Data.Semigroup (Semigroup (..), stimesIdempotentMonoid)
171158
import GHC.Exts (Int (..), Int#, TYPE, (==#))
172159
import GHC.Stack (HasCallStack)
173-
import Prelude hiding
174-
( filter
175-
, foldl
176-
, foldr
177-
, lookup
178-
, map
179-
, null
180-
, pred
181-
)
160+
import Prelude hiding (filter, foldl, foldr, lookup, map,
161+
null, pred)
182162
import Text.Read hiding (step)
183163

184164
import qualified Data.Data as Data

Data/HashMap/Internal/Array.hs

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -82,38 +82,18 @@ import Control.Applicative (liftA2)
8282
import Control.DeepSeq (NFData (..), NFData1 (..))
8383
import Control.Monad ((>=>))
8484
import Control.Monad.ST (runST, stToIO)
85-
import GHC.Exts
86-
( Int (..)
87-
, SmallArray#
88-
, SmallMutableArray#
89-
, cloneSmallMutableArray#
90-
, copySmallArray#
91-
, copySmallMutableArray#
92-
, indexSmallArray#
93-
, newSmallArray#
94-
, readSmallArray#
95-
, reallyUnsafePtrEquality#
96-
, sizeofSmallArray#
97-
, sizeofSmallMutableArray#
98-
, tagToEnum#
99-
, thawSmallArray#
100-
, unsafeCoerce#
101-
, unsafeFreezeSmallArray#
102-
, unsafeThawSmallArray#
103-
, writeSmallArray#
104-
)
85+
import GHC.Exts (Int (..), SmallArray#, SmallMutableArray#,
86+
cloneSmallMutableArray#, copySmallArray#,
87+
copySmallMutableArray#, indexSmallArray#,
88+
newSmallArray#, readSmallArray#,
89+
reallyUnsafePtrEquality#, sizeofSmallArray#,
90+
sizeofSmallMutableArray#, tagToEnum#,
91+
thawSmallArray#, unsafeCoerce#,
92+
unsafeFreezeSmallArray#, unsafeThawSmallArray#,
93+
writeSmallArray#)
10594
import GHC.ST (ST (..))
106-
import Prelude hiding
107-
( all
108-
, filter
109-
, foldMap
110-
, foldl
111-
, foldr
112-
, length
113-
, map
114-
, read
115-
, traverse
116-
)
95+
import Prelude hiding (all, filter, foldMap, foldl, foldr, length,
96+
map, read, traverse)
11797

11898
import qualified Language.Haskell.TH.Syntax as TH
11999
#if defined(ASSERTS)

Data/HashMap/Internal/Strict.hs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,28 +126,12 @@ import Control.Monad.ST (runST)
126126
import Data.Bits ((.&.), (.|.))
127127
import Data.Coerce (coerce)
128128
import Data.Functor.Identity (Identity (..))
129-
import Data.HashMap.Internal hiding
130-
( adjust
131-
, alter
132-
, alterF
133-
, differenceWith
134-
, fromList
135-
, fromListWith
136-
, fromListWithKey
137-
, insert
138-
, insertWith
139-
, intersectionWith
140-
, intersectionWithKey
141-
, map
142-
, mapMaybe
143-
, mapMaybeWithKey
144-
, mapWithKey
145-
, singleton
146-
, traverseWithKey
147-
, unionWith
148-
, unionWithKey
149-
, update
150-
)
129+
import Data.HashMap.Internal hiding (adjust, alter, alterF, differenceWith,
130+
fromList, fromListWith, fromListWithKey, insert,
131+
insertWith, intersectionWith, intersectionWithKey,
132+
map, mapMaybe, mapMaybeWithKey, mapWithKey,
133+
singleton, traverseWithKey, unionWith,
134+
unionWithKey, update)
151135
import Data.Hashable (Hashable)
152136
import Prelude hiding (lookup, map)
153137

Data/HashSet/Internal.hs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,8 @@ module Data.HashSet.Internal
9393
import Control.DeepSeq (NFData (..), NFData1 (..), liftRnf2)
9494
import Data.Data (Constr, Data (..), DataType)
9595
import Data.Functor.Classes
96-
import Data.HashMap.Internal
97-
( HashMap
98-
, equalKeys
99-
, equalKeys1
100-
, foldMapWithKey
101-
, foldlWithKey
102-
, foldrWithKey
103-
)
96+
import Data.HashMap.Internal (HashMap, equalKeys, equalKeys1, foldMapWithKey,
97+
foldlWithKey, foldrWithKey)
10498
import Data.Hashable (Hashable (hashWithSalt))
10599
import Data.Hashable.Lifted (Hashable1 (..), Hashable2 (..))
106100
import Data.Semigroup (Semigroup (..), stimesIdempotentMonoid)

tests/Strictness.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ import Data.HashMap.Strict (HashMap)
1212
import Data.Hashable (Hashable (hashWithSalt))
1313
import Data.Maybe (fromMaybe, isJust)
1414
import Test.ChasingBottoms.IsBottom
15-
import Test.QuickCheck
16-
( Arbitrary (arbitrary)
17-
, Property
18-
, (.&&.)
19-
, (===)
20-
)
15+
import Test.QuickCheck (Arbitrary (arbitrary), Property, (.&&.),
16+
(===))
2117
import Test.QuickCheck.Function
2218
import Test.QuickCheck.Poly (A)
2319
import Test.Tasty (TestTree, testGroup)

0 commit comments

Comments
 (0)