Re-write variables fetching in a smarter way
Clarification and motivation
This is the continuation of #65.
It would simplify things if we:
- Extract the handlers related to stake frames, scopes, and variables so that they are produced together and share the necessary common context;
- Let their user operate with types there
VariableId
does not appear, rather all the data is included directly -StackFrame
keeps a list ofScope
s,Scope
keeps a list ofVariable
s
This would be more Haskell-ish and easier to test.
E.g. with this the Variable
datatype will be reduced to
data Variable = Variable
{ name :: Text
, value :: Text
, type :: Maybe Text
, presentationHint :: PresentationHint
, children :: [Variable]
, memoryReference :: Maybe Int
}