diff --git a/tools/lsp/squirrel/src/Tree.hs b/tools/lsp/squirrel/src/Tree.hs index 02f71058e..c45ab4632 100644 --- a/tools/lsp/squirrel/src/Tree.hs +++ b/tools/lsp/squirrel/src/Tree.hs @@ -213,7 +213,9 @@ traverseMany visitors orElse = go case tree of Tree (Right (r, union)) -> do union' <- traverse go union - return $ Tree (Right (orElse r, union')) + return $ Tree $ Right (orElse r, union') + Tree (Left err) -> do + return $ Tree $ Left $ fmap orElse err -- | Make a tree out of a layer and an info. mk :: (Functor f, Element f fs) => info -> f (Tree fs info) -> Tree fs info