Skip to content

Commit

Permalink
Remove open import syntax (#2307)
Browse files Browse the repository at this point in the history
* Closes #2252 
* Depends on #2305
  • Loading branch information
lukaszcz authored Aug 25, 2023
1 parent ef16b45 commit 93a91a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Juvix/Compiler/Concrete/Translation/FromSource.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1250,12 +1250,12 @@ atomicExpression = do
openModule :: forall r. (Members '[Error ParserError, PathResolver, Files, InfoTableBuilder, PragmasStash, JudocStash, NameIdGen] r) => ParsecS r (OpenModule 'Parsed)
openModule = do
_openModuleKw <- kw kwOpen
_openModuleImportKw <- optional (kw kwImport)
_openModuleName <- name
whenJust _openModuleImportKw (const (P.lift (importedModule (moduleNameToTopModulePath _openModuleName))))
_openUsingHiding <- optional usingOrHiding
_openPublicKw <- Irrelevant <$> optional (kw kwPublic)
let _openPublic = maybe NoPublic (const Public) (_openPublicKw ^. unIrrelevant)
_openModuleImportKw :: Maybe KeywordRef
_openModuleImportKw = Nothing
return
OpenModule
{ _openImportAsName = Nothing,
Expand Down
6 changes: 3 additions & 3 deletions tests/positive/FancyPaths/Main.juvix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module Main;

open import Dep;
open import Other;
open import Home;
import Dep open;
import Other open;
import Home open;

axiom x : dep;
axiom y : other;
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/Commands/typecheck.smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tests:
- typecheck
args:
- positive/Internal/Simple.juvix
stdin: 'module OtherModule; open import Stdlib.Prelude; main : Nat; main := 5;'
stdin: 'module OtherModule; import Stdlib.Prelude open; main : Nat := 5;'
stderr:
contains: 'positive/Internal/Simple.juvix'
exit-status: 1

0 comments on commit 93a91a7

Please sign in to comment.