diff --git a/src/Juvix/Compiler/Concrete/Translation/FromSource.hs b/src/Juvix/Compiler/Concrete/Translation/FromSource.hs index 3e16c9d233..76f41fa811 100644 --- a/src/Juvix/Compiler/Concrete/Translation/FromSource.hs +++ b/src/Juvix/Compiler/Concrete/Translation/FromSource.hs @@ -204,9 +204,10 @@ topModuleDef = do replInput :: forall r. Members '[Files, PathResolver, InfoTableBuilder, JudocStash, NameIdGen, Error ParserError, State (Maybe ParsedPragmas)] r => ParsecS r ReplInput replInput = P.label "" $ - (ReplExpression <$> parseExpressionAtoms) - <|> (ReplImport <$> import_) - <|> (ReplOpenImport <$> openModule) + ReplExpression <$> parseExpressionAtoms + <|> P.try (ReplOpenImport <$> newOpenSyntax) + <|> ReplImport <$> import_ + <|> ReplOpenImport <$> openModule -------------------------------------------------------------------------------- -- Symbols and names diff --git a/tests/smoke/Commands/repl.smoke.yaml b/tests/smoke/Commands/repl.smoke.yaml index db667562e9..f82b95a645 100644 --- a/tests/smoke/Commands/repl.smoke.yaml +++ b/tests/smoke/Commands/repl.smoke.yaml @@ -449,6 +449,15 @@ tests: contains: "true" exit-status: 0 + - name: open-import-from-stdlib-new-syntax + command: + - juvix + - repl + stdin: "import Stdlib.Data.Int.Ord open\n1 == 1" + stdout: + contains: "true" + exit-status: 0 + - name: infix-constructors command: - juvix