From ab90ff0464ed3a40e0550ee8781f4f89bb7fe5c7 Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Mon, 7 May 2018 14:56:10 -0400 Subject: [PATCH] fix repl functions --- src/Semantic/Util.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index 1aaf9d875..b608ce262 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -35,6 +35,7 @@ justEvaluating . runResolutionError . runEvalError . runAddressError + . constrainedToValuePrecise evaluatingWithHoles = runM . lower @@ -46,6 +47,7 @@ evaluatingWithHoles . resumingEvalError . resumingResolutionError . resumingAddressError @(Value Precise) + . constrainedToValuePrecise -- The order is significant here: caching has to run before typeChecking, or else we’ll nondeterministically produce TypeErrors as part of the result set. While this is probably actually correct, it will require us to have an Ord instance for TypeError, which we don’t have yet. checking @@ -60,6 +62,13 @@ checking . runAddressError . runTypeError . caching @[] + . constrainedToValueMonovariant + +constrainedToValuePrecise :: Evaluator Precise term (Value Precise) effects a -> Evaluator Precise term (Value Precise) effects a +constrainedToValuePrecise = id + +constrainedToValueMonovariant :: Evaluator Monovariant term (Type Monovariant) effects a -> Evaluator Monovariant term (Type Monovariant) effects a +constrainedToValueMonovariant = id evalGoProject path = justEvaluating =<< evaluateProject goParser Language.Go Nothing path evalRubyProject path = justEvaluating =<< evaluateProject rubyParser Language.Ruby rubyPrelude path