mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Rename TestEvaluatingResult to TestEvaluatingState and add an actual result synonym.
This commit is contained in:
parent
6b6574eb56
commit
22f3440e0e
@ -19,6 +19,7 @@ module SpecHelpers
|
|||||||
, lookupMembers
|
, lookupMembers
|
||||||
, EdgeLabel(..)
|
, EdgeLabel(..)
|
||||||
, TestEvaluatingResult
|
, TestEvaluatingResult
|
||||||
|
, TestEvaluatingState
|
||||||
, evaluateProject
|
, evaluateProject
|
||||||
) where
|
) where
|
||||||
|
|
||||||
@ -143,14 +144,15 @@ type TestEvaluatingErrors term
|
|||||||
, BaseError (UnspecializedError Precise (Val term))
|
, BaseError (UnspecializedError Precise (Val term))
|
||||||
, BaseError (LoadError Precise (Val term))
|
, BaseError (LoadError Precise (Val term))
|
||||||
]
|
]
|
||||||
type TestEvaluatingResult term a
|
type TestEvaluatingState term a
|
||||||
= ( ScopeGraph Precise
|
= ( ScopeGraph Precise
|
||||||
, ( Heap Precise Precise (Value term Precise)
|
, ( Heap Precise Precise (Val term)
|
||||||
, Either (SomeError (Sum.Sum (TestEvaluatingErrors term))) a
|
, Either (SomeError (Sum.Sum (TestEvaluatingErrors term))) a
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
type TestEvaluatingResult term = ModuleTable (Module (ModuleResult Precise (Val term)))
|
||||||
testEvaluating :: Evaluator term Precise (Val term) (TestEvaluatingC term) a
|
testEvaluating :: Evaluator term Precise (Val term) (TestEvaluatingC term) a
|
||||||
-> IO (TestEvaluatingResult term a)
|
-> IO (TestEvaluatingState term a)
|
||||||
testEvaluating
|
testEvaluating
|
||||||
= runM
|
= runM
|
||||||
. runTraceByIgnoring
|
. runTraceByIgnoring
|
||||||
@ -170,7 +172,7 @@ testEvaluating
|
|||||||
|
|
||||||
type Val term = Value term Precise
|
type Val term = Value term Precise
|
||||||
|
|
||||||
evaluateProject :: (HasPrelude lang, SLanguage lang) => TaskSession -> Proxy lang -> [FilePath] -> IO (TestEvaluatingResult Any a)
|
evaluateProject :: (HasPrelude lang, SLanguage lang) => TaskSession -> Proxy lang -> [FilePath] -> IO (TestEvaluatingState Any (TestEvaluatingResult Any))
|
||||||
evaluateProject session proxy = case Map.lookup lang analysisParsers of
|
evaluateProject session proxy = case Map.lookup lang analysisParsers of
|
||||||
Just (SomeParser parser) -> unsafeCoerce . testEvaluating <=< evaluateProject' session proxy parser
|
Just (SomeParser parser) -> unsafeCoerce . testEvaluating <=< evaluateProject' session proxy parser
|
||||||
_ -> error $ "analysis not supported for " <> show lang
|
_ -> error $ "analysis not supported for " <> show lang
|
||||||
|
Loading…
Reference in New Issue
Block a user