1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 05:11:44 +03:00

Move withPrelude into the where clause.

This commit is contained in:
Rob Rix 2018-05-06 12:09:16 -04:00
parent 5a9b64db34
commit 731aed5b3c

View File

@ -364,14 +364,7 @@ evaluatePackageBodyWith perModule perTerm body
v <- maybe unit (pure . snd) <$> require m
maybe v ((`call` []) <=< variable) sym
withPrelude :: Members '[ EvalModule term value
, Reader (Environment location value)
, State (Environment location value)
] effects
=> Maybe (Module term)
-> Evaluator location term value effects a
-> Evaluator location term value effects a
withPrelude Nothing a = a
withPrelude (Just prelude) a = do
preludeEnv <- evaluateModule prelude *> getEnv
withDefaultEnvironment preludeEnv a
withPrelude Nothing a = a
withPrelude (Just prelude) a = do
preludeEnv <- evaluateModule prelude *> getEnv
withDefaultEnvironment preludeEnv a