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.
Add RustExpr to split prettyprint and parse (#20)
* add RustExpr to separate pretty printing and creating expression from Agda internals * rename after refactor to RustExpr * rename after refactor to RustExpr - fix * swap unless to when * rename back to PrettyPrintingUtils for easier review
- Loading branch information
Showing
7 changed files
with
103 additions
and
83 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Agda.Compiler.Rust.RustExpr ( | ||
RustName, | ||
RustType, | ||
RustExpr(..), | ||
RustElem(..), | ||
FunBody | ||
) where | ||
|
||
type RustName = String | ||
type RustType = String | ||
type FunBody = String | ||
|
||
data RustElem = RustElem RustName RustType | ||
deriving ( Show ) | ||
|
||
data RustExpr | ||
= TeMod RustName [RustExpr] | ||
| TeEnum RustName [RustName] | ||
| TeFun RustName RustElem RustType FunBody | ||
| Unhandled RustName String | ||
deriving ( Show ) |
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