Skip to content

Commit 3d80cd8

Browse files
committed
Fix small bug in typechecking
1 parent da9b076 commit 3d80cd8

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

homotopy-core/src/typecheck.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,7 @@ where
410410
let dimension = diagram.dimension();
411411

412412
// Construct the fully exploded scaffold of the diagram.
413-
// Node key = stratum, edge key = whether the edge is an atomic edge.
414-
let mut scaffold: Scaffold<usize, bool> = Scaffold::default();
413+
let mut scaffold: Scaffold<usize> = Scaffold::default(); // node key = stratum
415414
scaffold.add_node(ScaffoldNode::new(0, diagram));
416415
for _ in 0..dimension {
417416
scaffold = scaffold
@@ -421,8 +420,8 @@ where
421420
SliceIndex::Interior(Height::Regular(_)) => Some(*key),
422421
SliceIndex::Interior(Height::Singular(_)) => Some(*key + 1),
423422
},
424-
|_, _, _| Some(true),
425-
|_, atomic, r| Some(*atomic && r.is_atomic()),
423+
|_, _, _| Some(()),
424+
|_, _, _| Some(()),
426425
)
427426
.unwrap();
428427
}
@@ -438,10 +437,7 @@ where
438437
neighbourhoods[n].push(vec![n]);
439438
} else {
440439
let mut neighbourhood = vec![vec![n]];
441-
for e in scaffold
442-
.edges_directed(n, petgraph::Direction::Incoming)
443-
.filter(|e| e.weight().key)
444-
{
440+
for e in scaffold.edges_directed(n, petgraph::Direction::Incoming) {
445441
for simplex in &neighbourhoods[e.source()] {
446442
neighbourhood.push([simplex.as_slice(), &[n]].concat());
447443
}

0 commit comments

Comments
 (0)