Skip to content

Commit a610701

Browse files
committed
redo conctructor hiding
1 parent 862ccef commit a610701

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

hnix-store-core/src/System/Nix/StorePath.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ module System.Nix.StorePath
1111
, HasStoreDir(..)
1212
, getStoreDir
1313
, StorePath(..)
14-
, StorePathName(..)
15-
, StorePathHashPart(..)
14+
, StorePathName
15+
, unStorePathName
16+
, StorePathHashPart
1617
, mkStorePathHashPart
18+
, unStorePathHashPart
1719
, -- * Manipulating 'StorePathName'
1820
makeStorePathName
1921
, validStorePathName

hnix-store-tests/src/System/Nix/Arbitrary/StorePath.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ instance Arbitrary StorePath where
3232
arbitrary
3333

3434
instance Arbitrary StorePathName where
35-
arbitrary = StorePathName . Data.Text.pack <$> ((:) <$> s1 <*> listOf sn)
35+
arbitrary =
36+
either undefined id
37+
. System.Nix.StorePath.makeStorePathName
38+
. Data.Text.pack <$> ((:) <$> s1 <*> listOf sn)
3639
where
3740
alphanum = ['a' .. 'z'] <> ['A' .. 'Z'] <> ['0' .. '9']
3841
s1 = elements $ alphanum <> "+-_?="

0 commit comments

Comments
 (0)