1
1
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:
Patrick Thomson 2018-07-18 10:39:34 -04:00
parent a18ee33fd9
commit 973a8ff2f7

View File

@ -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)