git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix multiple let bindings in psci #258
b68b424Phil Freeman
psci/Parser.hs+2−1
@@ -26,6 +26,7 @@ import Control.Applicative hiding (many)
26import Text.Parsec hiding ((<|>))
26import Text.Parsec hiding ((<|>))
27
27
28import qualified Language.PureScript as P
28import qualified Language.PureScript as P
29+import qualified Language.PureScript.Parser.Common as C (mark, same)
29
30
30-- |
31-- |
31-- PSCI version of @let@.
32-- PSCI version of @let@.
@@ -34,7 +35,7 @@ import qualified Language.PureScript as P
34-- we actually want the normal @let@.
35-- we actually want the normal @let@.
35--
36--
36psciLet :: Parsec String P.ParseState Command
37psciLet :: Parsec String P.ParseState Command
37−psciLet = Let <$> (P.Let <$> (P.reserved "let" *> P.indented *> many1 P.parseDeclaration))
38+psciLet = Let <$> (P.Let <$> (P.reserved "let" *> P.indented *> C.mark (many1 (C.same *> P.parseDeclaration))))
38
39
39-- |
40-- |
40-- Parses PSCI metacommands or expressions input from the user.
41-- Parses PSCI metacommands or expressions input from the user.