From 515b9b64a111d0ade1f87393939b6fb86e785361 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Fri, 2 Mar 2018 14:38:01 -0800 Subject: [PATCH] Formatting those type sigs --- src/Analysis/Abstract/Evaluating.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Analysis/Abstract/Evaluating.hs b/src/Analysis/Abstract/Evaluating.hs index 800b9e5d6..aceb72ae8 100644 --- a/src/Analysis/Abstract/Evaluating.hs +++ b/src/Analysis/Abstract/Evaluating.hs @@ -37,13 +37,21 @@ newtype Evaluator v = Evaluator { runEvaluator :: Eff (Evaluating v) v } -- | Require/import another term/file and return an Effect. -- -- Looks up the term's name in the cache of evaluated modules first, returns a value if found, otherwise loads/evaluates the module. -require :: forall v es. (Members (Evaluating v) es, AbstractEnvironmentFor v) => ModuleName -> Eff es (EnvironmentFor v) +require :: forall v es. + ( Members (Evaluating v) es + , AbstractEnvironmentFor v + ) + => ModuleName -> Eff es (EnvironmentFor v) require name = get @(Linker (EnvironmentFor v)) >>= maybe (load name) pure . linkerLookup name -- | Load another term/file and return an Effect. -- -- Always loads/evaluates. -load :: forall v es. (Members (Evaluating v) es, AbstractEnvironmentFor v) => ModuleName -> Eff es (EnvironmentFor v) +load :: forall v es. + ( Members (Evaluating v) es + , AbstractEnvironmentFor v + ) + => ModuleName -> Eff es (EnvironmentFor v) load name = ask @(Linker (Evaluator v)) >>= maybe notFound evalAndCache . linkerLookup name where notFound = fail ("cannot find " <> show name) evalAndCache e = do