1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Merge pull request #2029 from github/fix-interposition

Bump effects for https://github.com/joshvera/effects/pull/55.
This commit is contained in:
Rob Rix 2018-07-11 15:14:36 -04:00 committed by GitHub
commit 984046e464
4 changed files with 5 additions and 3 deletions

View File

@ -85,6 +85,7 @@ convergingModules :: ( AbstractValue address value effects
, Member (State (Cache term address (Cell address) value)) effects , Member (State (Cache term address (Cell address) value)) effects
, Member (Env address) effects , Member (Env address) effects
, Member (State (Heap address (Cell address) value)) effects , Member (State (Heap address (Cell address) value)) effects
, Effects effects
) )
=> SubtermAlgebra Module term (TermEvaluator term address value effects address) => SubtermAlgebra Module term (TermEvaluator term address value effects address)
-> SubtermAlgebra Module term (TermEvaluator term address value effects address) -> SubtermAlgebra Module term (TermEvaluator term address value effects address)

View File

@ -58,7 +58,7 @@ runParser parser blobSource = unsafeUseAsCStringLen (sourceBytes blobSource) $
-- | Parse 'Source' with the given 'TS.Language' and return its AST. -- | Parse 'Source' with the given 'TS.Language' and return its AST.
-- Returns Nothing if the operation timed out. -- Returns Nothing if the operation timed out.
parseToAST :: (Bounded grammar, Enum grammar, Member (Lift IO) effects, Member Trace effects) => Timeout -> Ptr TS.Language -> Blob -> Eff effects (Maybe (AST [] grammar)) parseToAST :: (Bounded grammar, Enum grammar, Member (Lift IO) effects, Member Trace effects, Effects effects) => Timeout -> Ptr TS.Language -> Blob -> Eff effects (Maybe (AST [] grammar))
parseToAST (Milliseconds s) language Blob{..} = bracket TS.ts_parser_new TS.ts_parser_delete $ \ parser -> do parseToAST (Milliseconds s) language Blob{..} = bracket TS.ts_parser_new TS.ts_parser_delete $ \ parser -> do
let parserTimeout = s * 1000 let parserTimeout = s * 1000

View File

@ -195,7 +195,7 @@ data ParserCancelled = ParserTimedOut deriving (Show, Typeable)
instance Exception ParserCancelled instance Exception ParserCancelled
-- | Parse a 'Blob' in 'IO'. -- | Parse a 'Blob' in 'IO'.
runParser :: (Member (Exc SomeException) effs, Member (Lift IO) effs, Member (Reader Config) effs, Member Telemetry effs, Member Trace effs) => Blob -> Parser term -> Eff effs term runParser :: (Member (Exc SomeException) effs, Member (Lift IO) effs, Member (Reader Config) effs, Member Telemetry effs, Member Trace effs, Effects effs) => Blob -> Parser term -> Eff effs term
runParser blob@Blob{..} parser = case parser of runParser blob@Blob{..} parser = case parser of
ASTParser language -> ASTParser language ->
time "parse.tree_sitter_ast_parse" languageTag $ do time "parse.tree_sitter_ast_parse" languageTag $ do
@ -225,6 +225,7 @@ runParser blob@Blob{..} parser = case parser of
, Member (Reader Config) effs , Member (Reader Config) effs
, Member Telemetry effs , Member Telemetry effs
, Member Trace effs , Member Trace effs
, Effects effs
) )
=> (Source -> assignment (Term (Sum syntaxes) (Record Assignment.Location)) -> ast -> Either (Error.Error String) (Term (Sum syntaxes) (Record Assignment.Location))) => (Source -> assignment (Term (Sum syntaxes) (Record Assignment.Location)) -> ast -> Either (Error.Error String) (Term (Sum syntaxes) (Record Assignment.Location)))
-> Parser ast -> Parser ast

2
vendor/effects vendored

@ -1 +1 @@
Subproject commit f1f98bb60f7df34359f4a6e1487353a0c644311b Subproject commit 105a543ccc98f2929cf0b1f1e97bcc48dfb8f718