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.
compile singe argument function - update Hello example
- Loading branch information
lemastero
committed
Dec 15, 2023
1 parent
61ee734
commit 0069f23
Showing
2 changed files
with
22 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
module test.Hello where | ||
|
||
-- simple record type | ||
data Rgb : Set where | ||
red green blue : Rgb | ||
{-# COMPILE AGDA2RUST Rgb #-} | ||
data TheRgb : Set where | ||
red green blue : TheRgb | ||
{-# COMPILE AGDA2RUST TheRgb #-} | ||
|
||
data TheWeekDay : Set where | ||
Monday Tuesday Wednesday Thursday Friday Saturday Sunday : TheWeekDay | ||
{-# COMPILE AGDA2RUST TheWeekDay #-} | ||
|
||
-- simple function | ||
idRgb : Rgb → Rgb | ||
idRgb x = x | ||
idRgb : TheRgb → TheRgb | ||
idRgb rgbArg = rgbArg | ||
{-# COMPILE AGDA2RUST idRgb #-} |
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