forked from omelkonian/agda-minimal-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "RustExpr to separate pretty printing from traverse Agda inter…
- Loading branch information
Piotr Paradziński
authored
Dec 18, 2023
1 parent
2f56f9a
commit 2c6f6f4
Showing
8 changed files
with
108 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module Agda.Compiler.Rust.PrettyPrintingUtils ( | ||
argList, | ||
bracket, | ||
combineLines, | ||
defsSeparator, | ||
exprSeparator, | ||
funReturnTypeSeparator, | ||
indent, | ||
typeSeparator | ||
) where | ||
|
||
bracket :: String -> String | ||
bracket str = "{\n" <> str <> "\n}" | ||
|
||
argList :: String -> String | ||
argList str = "(" <> str <> ")" | ||
|
||
indent :: String | ||
indent = " " | ||
|
||
exprSeparator :: String | ||
exprSeparator = " " | ||
|
||
defsSeparator :: String | ||
defsSeparator = "\n" | ||
|
||
typeSeparator :: String | ||
typeSeparator = ":" | ||
|
||
funReturnTypeSeparator :: String | ||
funReturnTypeSeparator = "->" | ||
|
||
combineLines :: [String] -> String | ||
combineLines xs = unlines (filter (not . null) xs) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters