git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #399 from garyb/import-indents
9d7e05bPhil Freeman
examples/passing/Operators.purs+3
@@ -2,6 +2,9 @@ module Main where
2
2
3 import Control.Monad.Eff
3 import Control.Monad.Eff
4 import Debug.Trace
4 import Debug.Trace
5+
6+ (?!) :: forall a. a -> a -> a
7+ (?!) x _ = x
5
8
6 bar :: String -> String -> String
9 bar :: String -> String -> String
7 bar = \s1 s2 -> s1 ++ s2
10 bar = \s1 s2 -> s1 ++ s2
src/Language/PureScript/Parser/Declarations.hs+2−2
@@ -123,13 +123,13 @@ parseImportDeclaration = do
123 where
123 where
124 stdImport = do
124 stdImport = do
125 moduleName' <- moduleName
125 moduleName' <- moduleName
126− idents <- P.optionMaybe $ parens $ commaSep parseDeclarationRef
126+ idents <- P.optionMaybe $ indented *> (parens $ commaSep parseDeclarationRef)
127 return $ ImportDeclaration moduleName' idents Nothing
127 return $ ImportDeclaration moduleName' idents Nothing
128 qualImport = do
128 qualImport = do
129 reserved "qualified"
129 reserved "qualified"
130 indented
130 indented
131 moduleName' <- moduleName
131 moduleName' <- moduleName
132− idents <- P.optionMaybe $ parens $ commaSep parseDeclarationRef
132+ idents <- P.optionMaybe $ indented *> (parens $ commaSep parseDeclarationRef)
133 reserved "as"
133 reserved "as"
134 asQ <- moduleName
134 asQ <- moduleName
135 return $ ImportDeclaration moduleName' idents (Just asQ)
135 return $ ImportDeclaration moduleName' idents (Just asQ)