From e6599d8b258b32c2eee65c56c251eb02f3c14f54 Mon Sep 17 00:00:00 2001 From: Lyndon Maydwell Date: Sat, 11 Dec 2021 18:11:40 +1100 Subject: [PATCH 1/2] adding error to not implemented placeholders --- ghcide/src/Development/IDE/Plugin/CodeAction.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide/src/Development/IDE/Plugin/CodeAction.hs b/ghcide/src/Development/IDE/Plugin/CodeAction.hs index 70d2d6da98..8b3d47bf20 100644 --- a/ghcide/src/Development/IDE/Plugin/CodeAction.hs +++ b/ghcide/src/Development/IDE/Plugin/CodeAction.hs @@ -680,7 +680,7 @@ newDefinitionAction IdeOptions{..} parsedModule Range{_start} name typ , _start `isInsideSrcSpan` l] , nextLineP <- Position{ _line = _line lastLineP + 1, _character = 0} = [ ("Define " <> sig - , [TextEdit (Range nextLineP nextLineP) (T.unlines ["", sig, name <> " = error \"not implemented\""])] + , [TextEdit (Range nextLineP nextLineP) (T.unlines ["", sig, name <> " = error \" " <> name <> " not implemented\""])] )] | otherwise = [] where From 9454756f0ae2e4fbd3da6b826db735663deb1f50 Mon Sep 17 00:00:00 2001 From: Lyndon Maydwell Date: Sun, 12 Dec 2021 05:38:08 +1100 Subject: [PATCH 2/2] changing to a hole after feedback --- ghcide/src/Development/IDE/Plugin/CodeAction.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide/src/Development/IDE/Plugin/CodeAction.hs b/ghcide/src/Development/IDE/Plugin/CodeAction.hs index 8b3d47bf20..ffc3ed12f7 100644 --- a/ghcide/src/Development/IDE/Plugin/CodeAction.hs +++ b/ghcide/src/Development/IDE/Plugin/CodeAction.hs @@ -680,7 +680,7 @@ newDefinitionAction IdeOptions{..} parsedModule Range{_start} name typ , _start `isInsideSrcSpan` l] , nextLineP <- Position{ _line = _line lastLineP + 1, _character = 0} = [ ("Define " <> sig - , [TextEdit (Range nextLineP nextLineP) (T.unlines ["", sig, name <> " = error \" " <> name <> " not implemented\""])] + , [TextEdit (Range nextLineP nextLineP) (T.unlines ["", sig, name <> " = _"])] )] | otherwise = [] where