1
1
mirror of https://github.com/github/semantic.git synced 2024-12-11 08:45:48 +03:00

Use HasErrors in Measured assignment.

This commit is contained in:
Rob Rix 2019-10-18 16:00:04 -04:00
parent fa34b0bab0
commit f64a028254
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -21,8 +21,6 @@ import Data.Blob
import qualified Data.Error as Error
import qualified Data.Flag as Flag
import qualified Data.Syntax as Syntax
import Data.Sum
import Data.Term
import Data.Typeable
import Parsing.CMark
import Parsing.Parser
@ -82,9 +80,8 @@ instance Exception ParserCancelled
runAssignment
:: ( Apply Foldable syntaxes
, Apply Functor syntaxes
, Element Syntax.Error syntaxes
:: ( Foldable term
, Syntax.HasErrors term
, Member (Error SomeException) sig
, Member (Reader TaskSession) sig
, Member Telemetry sig
@ -93,11 +90,11 @@ runAssignment
, Carrier sig m
, MonadIO m
)
=> (Source -> assignment (Term (Sum syntaxes) Assignment.Loc) -> ast -> Either (Error.Error String) (Term (Sum syntaxes) Assignment.Loc))
=> (Source -> assignment (term Assignment.Loc) -> ast -> Either (Error.Error String) (term Assignment.Loc))
-> Parser ast
-> Blob
-> assignment (Term (Sum syntaxes) Assignment.Loc)
-> m (Term (Sum syntaxes) Assignment.Loc)
-> assignment (term Assignment.Loc)
-> m (term Assignment.Loc)
runAssignment assign parser blob@Blob{..} assignment = do
taskSession <- ask
let requestID' = ("github_request_id", requestID taskSession)