Skip to content

Commit

Permalink
fix use module name instead of first directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lemastero committed Dec 18, 2023
1 parent 6079bf5 commit 4db314b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Agda/Compiler/Rust/ToRustCompiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ compileModule mName cdefs =
<> defsSeparator

moduleName :: TopLevelModuleName -> String
moduleName n = prettyShow (Nel.head (moduleNameParts n))
moduleName n = prettyShow (Nel.last (moduleNameParts n))

moduleHeader :: String -> String
moduleHeader mName = "mod" <> exprSeparator <> mName <> exprSeparator
2 changes: 1 addition & 1 deletion test/hello.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mod test {
mod hello {
enum TheRgb {
Red, Green, Blue
}
Expand Down

0 comments on commit 4db314b

Please sign in to comment.