1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Try to move timeout up a level

This commit is contained in:
Timothy Clem 2020-01-22 11:19:13 -08:00
parent 9af6d028ea
commit 177e6420aa

View File

@ -59,8 +59,8 @@ parseToPreciseAST
-> Blob
-> m (Either TSParseException (t Loc))
parseToPreciseAST parseTimeout unmarshalTimeout language blob = runParse parseTimeout language blob $ \ rootPtr ->
TS.withCursor (castPtr rootPtr) $ \ cursor ->
withTimeout $
withTimeout $
TS.withCursor (castPtr rootPtr) $ \ cursor ->
runReader (TS.UnmarshalState (Source.bytes (blobSource blob)) cursor) (liftIO (peek rootPtr) >>= TS.unmarshalNode)
`Exc.catch` (Exc.throw . UnmarshalFailure . TS.getUnmarshalError)
where