From a11e92af602bf4b88ce769c1f204776e4999a5f1 Mon Sep 17 00:00:00 2001 From: Kirill Andreev Date: Fri, 10 Jul 2020 12:47:34 +0400 Subject: [PATCH] Remove unused traverseOnly --- tools/lsp/squirrel/src/Tree.hs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/tools/lsp/squirrel/src/Tree.hs b/tools/lsp/squirrel/src/Tree.hs index c45ab4632..6051bac2e 100644 --- a/tools/lsp/squirrel/src/Tree.hs +++ b/tools/lsp/squirrel/src/Tree.hs @@ -155,32 +155,6 @@ traverseTree act = go err' <- traverse act err return (Tree (Left err')) -traverseOnly - :: forall f a b fs m - . ( Monad m - , Monad m - , Element f fs - , Apply Foldable fs - , Apply Functor fs - , Apply Traversable fs - , Traversable f - , HasRange a - ) - => (a -> f (Tree fs a) -> m (f (Tree fs a))) - -> Tree fs a -> m (Tree fs a) -traverseOnly act = go - where - go (match -> Just (r, fa)) = do - fb <- act r fa - fc <- traverse go fb - pure $ mk r fc - - go tree@(Tree (Right (r, union))) = do - union' <- traverse go union - pure $ Tree $ Right (r, union') - - go tree = pure tree - data Visit fs a b m where Visit :: (Element f fs, Traversable f)