diff --git a/main/Main.hs b/main/Main.hs index c2f518a..01691cc 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -95,9 +95,9 @@ listDirRecursive path = resolveDir' path >>= readDir parseFiles = S.mapMaybeM $ (\path -> parseNixFileLoc path >>= \case - Success parse -> do + Right parse -> do pure $ Just parse - Failure why -> do + Left why -> do liftIO $ whenNormal $ log $ "Failure when parsing:\n" <> pShow why pure Nothing) diff --git a/nix-linter.cabal b/nix-linter.cabal index 21790e0..64d6584 100644 --- a/nix-linter.cabal +++ b/nix-linter.cabal @@ -68,7 +68,7 @@ library build-depends: base >=4.9, - hnix >=0.8 && < 0.11, + hnix >=0.8 && < 0.14, data-fix, fixplate >= 0.1.7, cmdargs >= 0.10, diff --git a/tests/Main.hs b/tests/Main.hs index a946d4f..a4556c5 100644 --- a/tests/Main.hs +++ b/tests/Main.hs @@ -47,8 +47,8 @@ case_examples_match = do let check = checkCategories $ Set.toList category parsed <- parseNixFileLoc (exampleDir example) >>= \case - Success x -> pure x - Failure err -> assertFailure (show err) + Right x -> pure x + Left err -> assertFailure (show err) let offenses = Set.fromList $ offense <$> check parsed assertEqual strippedName offenses category