git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Reverse the binders to make it easier.
commitace78ad8c56c7add3c8e05e8c11ddb5c6b42c04f authorjoneshf <jones3.hardy@gmail.com> dateTue 18 Feb 2014, 02:25 (13 years ago) parent573a415
1 file changed+3−3
psci/Main.hs+3−3
psci/Main.hs+3−3
@@ -144,14 +144,14 @@ main = do
144144 case P.runIndentParser "" parseExpression (unlines ls) of
145145 Left err -> outputStrLn (show err)
146146 Right decl -> do
147− handleDeclaration loadedModules imports binders decl
147+ handleDeclaration loadedModules imports (reverse binders) decl
148148 go imports loadedModules binders
149− Right binder -> go imports loadedModules (binders ++ [binder])
149+ Right binder -> go imports loadedModules (binder:binders)
150150 Import moduleName -> go (imports ++ [P.ProperName moduleName]) loadedModules binders
151151 Let line -> do
152152 moreLets <- case P.runIndentParser "" parseDoNotationLet line of
153153 Left err -> outputStrLn (show err) >> return binders
154− Right l -> return $ binders ++ [l]
154+ Right l -> return $ l:binders
155155 go imports loadedModules moreLets
156156 LoadModule moduleFile -> do
157157 ms <- lift $ loadModule moduleFile