From 0d3dadb143c488cd0ea0791940c315c554fbddcd Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 30 Mar 2018 18:14:39 -0400 Subject: [PATCH] Functor laws. --- src/Language/Ruby/Syntax.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index 5a47c4b3b..84b3b6c32 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -31,8 +31,8 @@ doRequire :: MonadEvaluatable location term value m doRequire name = do moduleTable <- getModuleTable case ModuleTable.lookup name moduleTable of - Nothing -> (,) <$> (fst <$> load name) <*> boolean True - Just (env, _) -> (,) <$> pure env <*> boolean False + Nothing -> (,) . fst <$> load name <*> boolean True + Just (env, _) -> (,) env <$> boolean False newtype Load a = Load { loadArgs :: [a] }