@@ -83,9 +83,6 @@ export enum ActionType {
8383 EnableFeatureGate = 'ENABLE_FEATURE_GATE' ,
8484 GotoPosition = 'GOTO_POSITION' ,
8585 SelectText = 'SELECT_TEXT' ,
86- RequestMiri = 'REQUEST_MIRI' ,
87- MiriSucceeded = 'MIRI_SUCCEEDED' ,
88- MiriFailed = 'MIRI_FAILED' ,
8986 RequestMacroExpansion = 'REQUEST_MACRO_EXPANSION' ,
9087 MacroExpansionSucceeded = 'MACRO_EXPANSION_SUCCEEDED' ,
9188 MacroExpansionFailed = 'MACRO_EXPANSION_FAILED' ,
@@ -342,46 +339,6 @@ interface GeneralSuccess {
342339 stderr : string ;
343340}
344341
345- const requestMiri = ( ) =>
346- createAction ( ActionType . RequestMiri ) ;
347-
348- interface MiriRequestBody {
349- code : string ;
350- edition : string ;
351- }
352-
353- interface MiriResponseBody {
354- success : boolean ;
355- stdout : string ;
356- stderr : string ;
357- }
358-
359- type MiriSuccess = GeneralSuccess ;
360-
361- const receiveMiriSuccess = ( { stdout, stderr } : MiriSuccess ) =>
362- createAction ( ActionType . MiriSucceeded , { stdout, stderr } ) ;
363-
364- const receiveMiriFailure = ( { error } : GenericApiFailure ) =>
365- createAction ( ActionType . MiriFailed , { error } ) ;
366-
367- export function performMiri ( ) : ThunkAction {
368- // TODO: Check a cache
369- return function ( dispatch , getState ) {
370- dispatch ( requestMiri ( ) ) ;
371-
372- const state = getState ( ) ;
373- const code = codeSelector ( state ) ;
374- const { configuration : {
375- edition,
376- } } = state ;
377- const body : MiriRequestBody = { code, edition } ;
378-
379- return jsonPost < MiriResponseBody > ( routes . miri , body )
380- . then ( json => dispatch ( receiveMiriSuccess ( json ) ) )
381- . catch ( json => dispatch ( receiveMiriFailure ( json ) ) ) ;
382- } ;
383- }
384-
385342const requestMacroExpansion = ( ) =>
386343 createAction ( ActionType . RequestMacroExpansion ) ;
387344
@@ -557,9 +514,6 @@ export type Action =
557514 | ReturnType < typeof enableFeatureGate >
558515 | ReturnType < typeof gotoPosition >
559516 | ReturnType < typeof selectText >
560- | ReturnType < typeof requestMiri >
561- | ReturnType < typeof receiveMiriSuccess >
562- | ReturnType < typeof receiveMiriFailure >
563517 | ReturnType < typeof requestMacroExpansion >
564518 | ReturnType < typeof receiveMacroExpansionSuccess >
565519 | ReturnType < typeof receiveMacroExpansionFailure >
0 commit comments