Skip to content
Snippets Groups Projects
Commit 69b86e77 authored by Fredrik Wieczerkowski's avatar Fredrik Wieczerkowski
Browse files

Use getSrcSpan in replaceFix

parent ce64f245
Branches
No related tags found
1 merge request!88Add a quick fix for stubbing out functions without a body
......@@ -12,7 +12,7 @@ module Curry.Base.QuickFix
( QuickFix (..), prependFix, replaceFix
) where
import Curry.Base.SpanInfo (HasSpanInfo (..), SpanInfo (..), getStartPosition)
import Curry.Base.SpanInfo (HasSpanInfo (..), getStartPosition, getSrcSpan)
import Curry.Base.TextEdit (TextEdit (..), insertEdit, replaceEdit)
data QuickFix = QuickFix
......@@ -29,4 +29,4 @@ prependFix s txt = QuickFix (insertEdit p txt)
-- |Creates a fix replacing the given entity with the given text and the given description.
replaceFix :: HasSpanInfo s => s -> String -> String -> QuickFix
replaceFix s txt = QuickFix (replaceEdit sp txt)
where sp = srcSpan $ getSpanInfo s
where sp = getSrcSpan s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment