git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #2078 from DavidLindbom/bugfix-1881-v2

Fix indentation bug #1881

commitbd7ac4f88e20bafc8f921453ac62aacc26ee8965 authorPhil Freeman <paf31@cantab.net> dateSun 1 May 2016, 15:08 (10 years ago) parent5a34984c9cbe4a
3 files changed+24
examples/failing/1881.purs+6 examples/passing/1881.purs+17 src/Language/PureScript/Parser/Declarations.hs+1
examples/failing/1881.pursnew file+6
@@ -0,0 +1,6 @@
1+-- @shouldFailWith ErrorParsingModule
2+module Main where
3+
4+foo =
5+bar :: Int
6+bar = 3
examples/passing/1881.pursnew file+17
@@ -0,0 +1,17 @@
1+module Main where
2+
3+foo =
4+ 1
5+
6+bar
7+ = 2
8+
9+baz
10+ =
11+ 3
12+
13+qux
14+ =
15+ 3
16+
17+main = Control.Monad.Eff.Console.log "Done"
src/Language/PureScript/Parser/Declarations.hs+1
@@ -93,6 +93,7 @@ parseValueDeclaration = do
9393 where
9494 parseValueWithWhereClause :: TokenParser Expr
9595 parseValueWithWhereClause = do
96+ C.indented
9697 value <- parseValue
9798 whereClause <- P.optionMaybe $ do
9899 C.indented