Skip to content

Commit f29031c

Browse files
committed
Revert "add unnonlocalpass"
This reverts commit 970ebb4.
1 parent 75c7c85 commit f29031c

File tree

4 files changed

+39
-58
lines changed

4 files changed

+39
-58
lines changed

Cargo.lock

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ missing_docs = "warn"
2626
[patch.crates-io]
2727

2828
# Uncomment to use unreleased versions of hugr
29-
hugr = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"}
30-
hugr-core = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"}
31-
hugr-passes = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"}
32-
hugr-cli = { git = "https://github.com/CQCL/hugr", branch = "doug/un-non-local"}
29+
# hugr = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" }
30+
# hugr-core = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" }
31+
# hugr-passes = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" }
32+
# hugr-cli = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" }
3333
# hugr-model = { git = "https://github.com/CQCL/hugr", rev = "09bd748398ce5afb39f5628d838756ccc03fc775" }
3434
# portgraph = { git = "https://github.com/CQCL/portgraph", rev = "68b96ac737e0c285d8c543b2d74a7aa80a18202c" }
3535

devenv.lock

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,10 @@
5151
"type": "github"
5252
}
5353
},
54-
"git-hooks": {
55-
"inputs": {
56-
"flake-compat": "flake-compat",
57-
"gitignore": "gitignore",
58-
"nixpkgs": [
59-
"nixpkgs"
60-
]
61-
},
62-
"locked": {
63-
"lastModified": 1737465171,
64-
"owner": "cachix",
65-
"repo": "git-hooks.nix",
66-
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
67-
"type": "github"
68-
},
69-
"original": {
70-
"owner": "cachix",
71-
"repo": "git-hooks.nix",
72-
"type": "github"
73-
}
74-
},
7554
"gitignore": {
7655
"inputs": {
7756
"nixpkgs": [
78-
"git-hooks",
57+
"pre-commit-hooks",
7958
"nixpkgs"
8059
]
8160
},
@@ -122,16 +101,34 @@
122101
"type": "github"
123102
}
124103
},
104+
"pre-commit-hooks": {
105+
"inputs": {
106+
"flake-compat": "flake-compat",
107+
"gitignore": "gitignore",
108+
"nixpkgs": [
109+
"nixpkgs"
110+
]
111+
},
112+
"locked": {
113+
"lastModified": 1735882644,
114+
"owner": "cachix",
115+
"repo": "pre-commit-hooks.nix",
116+
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
117+
"type": "github"
118+
},
119+
"original": {
120+
"owner": "cachix",
121+
"repo": "pre-commit-hooks.nix",
122+
"type": "github"
123+
}
124+
},
125125
"root": {
126126
"inputs": {
127127
"devenv": "devenv",
128128
"fenix": "fenix",
129-
"git-hooks": "git-hooks",
130129
"nixpkgs": "nixpkgs",
131130
"nixpkgs-2305": "nixpkgs-2305",
132-
"pre-commit-hooks": [
133-
"git-hooks"
134-
]
131+
"pre-commit-hooks": "pre-commit-hooks"
135132
}
136133
},
137134
"rust-analyzer-src": {

tket2-hseries/src/lib.rs

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
use derive_more::{Display, Error, From};
55
use hugr::{
66
algorithms::{
7-
const_fold::{ConstFoldError, ConstantFoldPass}, force_order, non_local::{NonLocalEdgesError, UnNonLocalPass}, validation::{ValidatePassError, ValidationLevel}, MonomorphizeError, MonomorphizePass, RemoveDeadFuncsError, RemoveDeadFuncsPass
7+
const_fold::{ConstFoldError, ConstantFoldPass},
8+
force_order,
9+
validation::{ValidatePassError, ValidationLevel},
10+
MonomorphizeError, MonomorphizePass, RemoveDeadFuncsError, RemoveDeadFuncsPass,
811
},
912
hugr::HugrError,
1013
Hugr, HugrView,
@@ -34,7 +37,6 @@ pub struct QSystemPass {
3437
monomorphize: bool,
3538
force_order: bool,
3639
lazify: bool,
37-
unnonlocal: bool,
3840
}
3941

4042
impl Default for QSystemPass {
@@ -45,7 +47,6 @@ impl Default for QSystemPass {
4547
monomorphize: true,
4648
force_order: true,
4749
lazify: true,
48-
unnonlocal: true,
4950
}
5051
}
5152
}
@@ -71,8 +72,6 @@ pub enum QSystemPassError {
7172
///
7273
/// [RemoveDeadFuncsPass]: hugr::algorithms::RemoveDeadFuncsError
7374
DCEError(RemoveDeadFuncsError),
74-
/// TODO docs
75-
UnNonLocalError(NonLocalEdgesError),
7675
/// No [FuncDefn] named "main" in [Module].
7776
///
7877
/// [FuncDefn]: hugr::ops::FuncDefn
@@ -85,10 +84,6 @@ impl QSystemPass {
8584
/// Run `QSystemPass` on the given [Hugr]. `registry` is used for
8685
/// validation, if enabled.
8786
pub fn run(&self, hugr: &mut Hugr) -> Result<(), QSystemPassError> {
88-
if self.unnonlocal {
89-
self.unnonlocal().run(hugr)?;
90-
}
91-
9287
if self.monomorphize {
9388
self.monomorphization().run(hugr)?;
9489

@@ -177,12 +172,6 @@ impl QSystemPass {
177172
MonomorphizePass::default().validation_level(self.validation_level)
178173
}
179174

180-
fn unnonlocal(&self) -> UnNonLocalPass {
181-
UnNonLocalPass::default().validation_level(self.validation_level)
182-
}
183-
184-
185-
186175
/// Returns a new `QSystemPass` with the given [ValidationLevel].
187176
pub fn with_validation_level(mut self, level: ValidationLevel) -> Self {
188177
self.validation_level = level;
@@ -229,14 +218,6 @@ impl QSystemPass {
229218
self.lazify = lazify;
230219
self
231220
}
232-
233-
/// TODO docs
234-
pub fn with_unnonlocal(self, unnonlocal: bool) -> Self {
235-
Self {
236-
unnonlocal,
237-
..self
238-
}
239-
}
240221
}
241222

242223
#[cfg(test)]

0 commit comments

Comments
 (0)