Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Name
- type UiWidget = Widget Name
- data UiVmState = UiVmState {}
- data UiTestPickerState = UiTestPickerState {}
- data UiBrowserState = UiBrowserState {}
- data UiState
- _ViewHelp :: Prism' UiState UiVmState
- _ViewPicker :: Prism' UiState UiTestPickerState
- _ViewContracts :: Prism' UiState UiBrowserState
- _ViewVm :: Prism' UiState UiVmState
- snapshotInterval :: Int
- type Pred a = a -> Bool
- data StepMode
- data Continuation a
- interpret :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => StepMode -> Stepper a -> StateT UiVmState IO (Continuation a)
- keepExecuting :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => StepMode -> Stepper a -> StateT UiVmState IO (Continuation a)
- isUnitTestContract :: Text -> DappInfo -> Bool
- mkVty :: IO Vty
- runFromVM :: SolverGroup -> RpcInfo -> Maybe Integer -> DappInfo -> VM -> IO VM
- initUiVmState :: VM -> UnitTestOptions -> Stepper () -> UiVmState
- debuggableTests :: UnitTestOptions -> (Text, [(Test, [AbiType])]) -> [(Text, Text)]
- isFuzzTest :: (Test, [AbiType]) -> Bool
- main :: UnitTestOptions -> FilePath -> FilePath -> IO ()
- takeStep :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => UiVmState -> StepMode -> EventM n UiState ()
- backstepUntil :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => (UiVmState -> Pred VM) -> EventM n UiState ()
- backstep :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => UiVmState -> IO UiVmState
- appEvent :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => BrickEvent Name e -> EventM Name UiState ()
- app :: UnitTestOptions -> App UiState () Name
- initialUiVmStateForTest :: UnitTestOptions -> (Text, Text) -> UiVmState
- myTheme :: [(AttrName, Attr)]
- drawUi :: UiState -> [UiWidget]
- drawHelpView :: [UiWidget]
- drawTestPicker :: UiTestPickerState -> [UiWidget]
- drawVmBrowser :: UiBrowserState -> [UiWidget]
- drawVm :: UiVmState -> [UiWidget]
- drawHelpBar :: UiWidget
- stepOneOpcode :: Stepper a -> StateT UiVmState IO ()
- isNewTraceAdded :: UiVmState -> Pred VM
- isNextSourcePosition :: UiVmState -> Pred VM
- isNextSourcePositionWithoutEntering :: UiVmState -> Pred VM
- isExecutionHalted :: UiVmState -> Pred VM
- currentSrcMap :: DappInfo -> VM -> Maybe SrcMap
- drawStackPane :: UiVmState -> UiWidget
- message :: VM -> String
- drawBytecodePane :: UiVmState -> UiWidget
- dim :: Widget n -> Widget n
- withHighlight :: Bool -> Widget n -> Widget n
- prettyIfConcrete :: Expr Buf -> String
- drawTracePane :: UiVmState -> UiWidget
- ourWrap :: String -> Widget n
- solidityList :: VM -> DappInfo -> List Name (Int, ByteString)
- drawSolidityPane :: UiVmState -> UiWidget
- ifTallEnough :: Int -> Widget n -> Widget n -> Widget n
- opWidget :: (Integral a, Show a) => (a, Op) -> Widget n
- selectedAttr :: AttrName
- dimAttr :: AttrName
- wordAttr :: AttrName
- boldAttr :: AttrName
- activeAttr :: AttrName
Documentation
Instances
(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "showMemory" k UiVmState UiVmState a b Source # | |
(k ~ A_Lens, a ~ Map Int (VM, Stepper ()), b ~ Map Int (VM, Stepper ())) => LabelOptic "snapshots" k UiVmState UiVmState a b Source # | |
(k ~ A_Lens, a ~ Int, b ~ Int) => LabelOptic "step" k UiVmState UiVmState a b Source # | |
(k ~ A_Lens, a ~ Stepper (), b ~ Stepper ()) => LabelOptic "stepper" k UiVmState UiVmState a b Source # | |
(k ~ A_Lens, a ~ UnitTestOptions, b ~ UnitTestOptions) => LabelOptic "testOpts" k UiVmState UiVmState a b Source # | |
(k ~ A_Lens, a ~ VM, b ~ VM) => LabelOptic "vm" k UiVmState UiVmState a b Source # | |
data UiTestPickerState Source #
Instances
(k ~ A_Lens, a ~ DappInfo, b ~ DappInfo) => LabelOptic "dapp" k UiTestPickerState UiTestPickerState a b Source # | |
Defined in EVM.TTY labelOptic :: Optic k NoIx UiTestPickerState UiTestPickerState a b # | |
(k ~ A_Lens, a ~ UnitTestOptions, b ~ UnitTestOptions) => LabelOptic "opts" k UiTestPickerState UiTestPickerState a b Source # | |
Defined in EVM.TTY labelOptic :: Optic k NoIx UiTestPickerState UiTestPickerState a b # | |
(k ~ A_Lens, a ~ List Name (Text, Text), b ~ List Name (Text, Text)) => LabelOptic "tests" k UiTestPickerState UiTestPickerState a b Source # | |
Defined in EVM.TTY labelOptic :: Optic k NoIx UiTestPickerState UiTestPickerState a b # |
data UiBrowserState Source #
Instances
(k ~ A_Lens, a ~ List Name (Addr, Contract), b ~ List Name (Addr, Contract)) => LabelOptic "contracts" k UiBrowserState UiBrowserState a b Source # | |
Defined in EVM.TTY labelOptic :: Optic k NoIx UiBrowserState UiBrowserState a b # | |
(k ~ A_Lens, a ~ UiVmState, b ~ UiVmState) => LabelOptic "vm" k UiBrowserState UiBrowserState a b Source # | |
Defined in EVM.TTY labelOptic :: Optic k NoIx UiBrowserState UiBrowserState a b # |
data Continuation a Source #
Each step command in the terminal should finish immediately with one of these outcomes.
interpret :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => StepMode -> Stepper a -> StateT UiVmState IO (Continuation a) Source #
This turns a Stepper
into a state action usable
from within the TTY loop, yielding a StepOutcome
depending on the StepMode
.
keepExecuting :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => StepMode -> Stepper a -> StateT UiVmState IO (Continuation a) Source #
initUiVmState :: VM -> UnitTestOptions -> Stepper () -> UiVmState Source #
debuggableTests :: UnitTestOptions -> (Text, [(Test, [AbiType])]) -> [(Text, Text)] Source #
takeStep :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => UiVmState -> StepMode -> EventM n UiState () Source #
backstepUntil :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => (UiVmState -> Pred VM) -> EventM n UiState () Source #
appEvent :: (?fetcher :: Fetcher, ?maxIter :: Maybe Integer) => BrickEvent Name e -> EventM Name UiState () Source #
initialUiVmStateForTest :: UnitTestOptions -> (Text, Text) -> UiVmState Source #
drawHelpView :: [UiWidget] Source #
drawTestPicker :: UiTestPickerState -> [UiWidget] Source #
drawVmBrowser :: UiBrowserState -> [UiWidget] Source #
drawStackPane :: UiVmState -> UiWidget Source #
drawBytecodePane :: UiVmState -> UiWidget Source #
drawTracePane :: UiVmState -> UiWidget Source #
solidityList :: VM -> DappInfo -> List Name (Int, ByteString) Source #
drawSolidityPane :: UiVmState -> UiWidget Source #