Skip to content

Commit ef9fb46

Browse files
committed
core: Fix unused warnings in Nar
1 parent 3608451 commit ef9fb46

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

hnix-store-core/src/System/Nix/Internal/Nar/Parser.hs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import qualified System.Nix.Internal.Nar.Options as Nar
4747
-- of the actions the parser can take, and @ParserState@ for the
4848
-- internals of the parser
4949
newtype NarParser m a = NarParser
50-
{ runNarParser ::
50+
{ _runNarParser ::
5151
State.StateT
5252
ParserState
5353
(Except.ExceptT
@@ -554,15 +554,12 @@ testParser' :: (m ~ IO) => FilePath -> IO (Either String ())
554554
testParser' fp =
555555
withFile fp ReadMode $ \h -> runParser Nar.narEffectsIO parseNar h "tmp"
556556

557-
558-
559-
560557
-- | Distance to the next multiple of 8
561558
padLen :: Int -> Int
562559
padLen n = (8 - n) `mod` 8
563560

564-
565-
dbgState :: IO.MonadIO m => NarParser m ()
566-
dbgState = do
561+
-- | Debugging helper
562+
_dbgState :: IO.MonadIO m => NarParser m ()
563+
_dbgState = do
567564
s <- State.get
568565
IO.liftIO $ print (tokenStack s, directoryStack s)

hnix-store-core/tests/NarFormat.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,16 +561,16 @@ sampleLinkToDirectoryBaseline = B64.decodeLenient $ BSL.concat
561561
getBigFileSize :: IO Int64
562562
getBigFileSize = fromMaybe 5000000 . readMaybe <$> (getEnv "HNIX_BIG_FILE_SIZE" <|> pure "")
563563

564-
564+
-- TODO: implement and use in generator #232
565565
-- | Add a link to a FileSystemObject. This is useful
566566
-- when creating Arbitrary FileSystemObjects. It
567567
-- isn't implemented yet
568-
mkLink
568+
_mkLink
569569
:: FilePath -- ^ Target
570570
-> FilePath -- ^ Link
571571
-> FileSystemObject -- ^ FileSystemObject to add link to
572572
-> FileSystemObject
573-
mkLink = undefined -- TODO
573+
_mkLink = undefined
574574

575575
mkBigFile :: FilePath -> IO ()
576576
mkBigFile path = do

0 commit comments

Comments
 (0)