Skip to content

Commit

Permalink
fixing refine a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
scmu committed Aug 22, 2024
1 parent 5086c86 commit d97e7f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Server/Handler/Guabao/Refine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ handler _params@RefineParams{filePath, specLines, implText, implStart} onFinish
logText "refine: success\n"
sendUpdateNotification filePath
-- -- clear errors
-- sendErrorNotification filePath []
sendErrorNotification filePath []
logText "refine: update notification sent\n"
-- edit source (dig holes + remove outer brackets)
-- editTexts filePath [(specLines, holelessImplText)] do
-- logText " text edited (refine)\n"
-- onFinish ()
editTexts filePath [(specLines, holelessImplText)] do
logText " text edited (refine)\n"
onFinish ()
logText "refine: end\n"
where
onError :: Error -> ServerM ()
Expand All @@ -174,7 +174,7 @@ handler _params@RefineParams{filePath, specLines, implText, implStart} onFinish
sendErrorNotification filePath [err]
logText "refine: update notification sent\n"
minusOneLine :: Pos -> Pos
minusOneLine (Pos filePath line column byte) = Pos filePath (line - 1) column undefined
minusOneLine (Pos filePath line column byte) = Pos filePath (line - 1) column 0
predictAndTranslateSpecRanges :: [Spec] -> [Spec]
predictAndTranslateSpecRanges = map (\spec@Specification{specRange} -> spec{specRange = minusOneLine' specRange})
where
Expand Down

0 comments on commit d97e7f8

Please sign in to comment.