Skip to content

Commit 5cb99c5

Browse files
committed
Convert: Path: reduce newtype accessor
M src/Nix/Convert.hs
1 parent d235731 commit 5cb99c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Nix/Convert.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ instance Convertible e t f m
219219
fromValue = fromMayToValue $ TString NoContext
220220

221221

222-
newtype Path = Path { getPath :: FilePath }
222+
newtype Path = Path FilePath
223223
deriving Show
224224

225225
instance ( Convertible e t f m
@@ -365,7 +365,7 @@ instance Convertible e t f m
365365

366366
instance Convertible e t f m
367367
=> ToValue Path m (NValue' t f m (NValue t f m)) where
368-
toValue = pure . nvPath' . getPath
368+
toValue = pure . nvPath' . coerce
369369

370370
instance Convertible e t f m
371371
=> ToValue StorePath m (NValue' t f m (NValue t f m)) where

0 commit comments

Comments
 (0)