mirror of
https://github.com/github/semantic.git
synced 2025-01-04 05:27:08 +03:00
don't use call stack in unError
This commit is contained in:
parent
a18ee33fd9
commit
973a8ff2f7
@ -220,8 +220,9 @@ instance Message String where
|
||||
errorSyntax :: Error.Error String -> [a] -> Error a
|
||||
errorSyntax Error.Error{..} = Error (ErrorStack $ errorSite <$> getCallStack callStack) errorExpected errorActual
|
||||
|
||||
unError :: HasCallStack => Span -> Error a -> Error.Error String
|
||||
unError span Error{..} = Error.withCallStack (freezeCallStack (fromCallSiteList $ unErrorSite <$> unErrorStack errorCallStack)) (Error.makeError span errorExpected errorActual)
|
||||
unError :: Span -> Error a -> Error.Error String
|
||||
unError span Error{..} = Error.Error span errorExpected errorActual stack
|
||||
where stack = fromCallSiteList $ unErrorSite <$> unErrorStack errorCallStack
|
||||
|
||||
data ErrorSite = ErrorSite { errorMessage :: String, errorLocation :: SrcLoc }
|
||||
deriving (Eq, Show, Generic, Named, Message)
|
||||
|
Loading…
Reference in New Issue
Block a user