-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bugs with extension sets, and small improvements.
- Loading branch information
Showing
6 changed files
with
68 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
(hugr 0) | ||
|
||
(declare-func example.callee | ||
[(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext) | ||
(forall ?ext ext-set) | ||
[(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext arithmetic.int . ?ext) | ||
(meta doc.title "Callee") | ||
(meta doc.description "This is a function declaration.")) | ||
|
||
(define-func example.caller | ||
[(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext) | ||
[(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext arithmetic.int) | ||
(meta doc.title "Caller") | ||
(meta doc.description "This defines a function that calls the function which we declared earlier.") | ||
(dfg | ||
[(%3 (@ arithmetic.int.types.int))] | ||
[(%4 (@ arithmetic.int.types.int))] | ||
(call (@ example.callee) [(%3 (@ arithmetic.int.types.int))] [(%4 (@ arithmetic.int.types.int))]))) | ||
(call (@ example.callee (ext)) [(%3 (@ arithmetic.int.types.int))] [(%4 (@ arithmetic.int.types.int))]))) | ||
|
||
(define-func example.load | ||
[] [(fn [(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext))] (ext) | ||
(dfg | ||
[] | ||
[(%5 (fn [(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext)))] | ||
(load-func (@ example.caller) [] [(%5 (fn [(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext)))]))) | ||
(load-func (@ example.caller) [] [(%5 (fn [(@ arithmetic.int.types.int)] [(@ arithmetic.int.types.int)] (ext arithmetic.int)))]))) |
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