From 02a595cc3642406fdd17a46a98587d98b39f2c63 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 24 May 2018 11:18:26 -0400 Subject: [PATCH] Infer the type of runType. --- src/Control/Abstract/Value.hs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Control/Abstract/Value.hs b/src/Control/Abstract/Value.hs index 0680f3d7b..3ae3bf5a2 100644 --- a/src/Control/Abstract/Value.hs +++ b/src/Control/Abstract/Value.hs @@ -107,20 +107,10 @@ newtype Eval location value (opaque :: * -> *) effects a = Eval { runEval :: Eff deriving instance Member NonDet effects => Alternative (Eval location value opaque effects) -runType :: Members '[ Fail - , Fresh - , NonDet - , Reader (Map Name Name) - , State (Map Name (Set Type)) - ] effects - => Eval Name Type opaque (Function opaque Type ': Unit Type ': Boolean Type ': Variable Type ': effects) a - -> Eval Name Type opaque effects a -runType = runVariable derefType . runBooleanType . runUnitType . runFunctionType - -runRest = runFresh 0 . runNonDetA . runFail . runEnv . runHeapType +runType = runFresh 0 . runNonDetA . runFail . runEnv . runHeapType . runVariable derefType . runBooleanType . runUnitType . runFunctionType resultType :: [Either String (Type, Map Name (Set Type))] -resultType = run (runRest (runType (prog BoolT))) +resultType = run (runType (prog BoolT)) data Function opaque value return where