From edab8835ad6687ddd160860ec3f9703a0e0c784b Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Tue, 9 Jul 2019 05:25:19 -0400 Subject: [PATCH] Shorten two lines of code to one --- src/Myriad/Server.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Myriad/Server.hs b/src/Myriad/Server.hs index 058db9f..95cce22 100644 --- a/src/Myriad/Server.hs +++ b/src/Myriad/Server.hs @@ -45,8 +45,7 @@ serverT = handleLanguages :<|> handleEval handleEval :: EvalRequest -> MyriadT m EvalResponse handleEval EvalRequest { language, code } = do logInfoN $ mconcat ["POST /eval"] - env <- ask - let MyriadConfig { languages } = config env + MyriadConfig { languages } <- asks config case find (\x -> name x == language) languages of Nothing -> throwError $ err404 { errBody = "Language " <> cvs language <> " was not found" } Just cfg -> do