Skip to content

Commit

Permalink
add concreteProgram as a field to data LoadedProgram
Browse files Browse the repository at this point in the history
  • Loading branch information
Vince committed Feb 20, 2024
1 parent e0cbc2c commit 502e81d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Server/Handler2/CustomMethod/Refine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ handler specRange filledText = do
refine :: LoadedProgram -> Range -> Text -> (LoadedProgram, Maybe Range)
refine loadedProgram specRange filledText =
LoadedProgram
{ _highlightingInfos = _
{ _concreteProgram = _
, _highlightingInfos = _
, _abstractProgram = _
, _scopingInfo = _
, _typeCheckingInfo = _
Expand Down
3 changes: 2 additions & 1 deletion src/Server/Handler2/CustomMethod/Reload.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ reload filepath onFinish onError = do
Right (pos, specs, warnings, redexes, counter) -> do
-- cache all results
loadedProgram <- cacheProgram filepath LoadedProgram
{ _highlightingInfos = collectHighlighting concrete
{ _concreteProgram = concrete
, _highlightingInfos = collectHighlighting concrete
, _abstractProgram = abstract
, _scopingInfo = collectLocationLinks abstract
, _typeCheckingInfo = collectHoverInfo abstract scopeTree
Expand Down
4 changes: 3 additions & 1 deletion src/Server/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import qualified Server.SrcLoc as SrcLoc
import GCL.WP.Type (StructWarning)
import Server.IntervalMap (IntervalMap)
import Syntax.Abstract as A
import Syntax.Concrete as C
import GCL.Predicate (PO, Spec)
import Data.IntMap (IntMap)

Expand Down Expand Up @@ -151,7 +152,8 @@ data GlobalEnv = GlobalEnv
}

data LoadedProgram = LoadedProgram
{ _highlightingInfos :: [J.SemanticTokenAbsolute]
{ _concreteProgram :: C.Program
, _highlightingInfos :: [J.SemanticTokenAbsolute]
, _abstractProgram :: A.Program
, _scopingInfo :: IntervalMap J.LocationLink
, _typeCheckingInfo :: IntervalMap (J.Hover, A.Type)
Expand Down

0 comments on commit 502e81d

Please sign in to comment.