|
1 | | -use { |
2 | | - crate::term::{ |
3 | | - Term, |
4 | | - Variant::{ |
5 | | - Application, Boolean, Difference, EqualTo, False, GreaterThan, GreaterThanOrEqualTo, |
6 | | - If, Integer, IntegerLiteral, Lambda, LessThan, LessThanOrEqualTo, Let, Negation, Pi, |
7 | | - Product, Quotient, Sum, True, Type, Unifier, Variable, |
8 | | - }, |
| 1 | +use crate::term::{ |
| 2 | + Term, |
| 3 | + Variant::{ |
| 4 | + Application, Boolean, Difference, EqualTo, False, GreaterThan, GreaterThanOrEqualTo, If, |
| 5 | + Integer, IntegerLiteral, Lambda, LessThan, LessThanOrEqualTo, Let, Negation, Pi, Product, |
| 6 | + Quotient, Sum, True, Type, Unifier, Variable, |
9 | 7 | }, |
10 | | - std::{cell::RefCell, convert::TryFrom, rc::Rc}, |
11 | 8 | }; |
| 9 | +use std::{cell::RefCell, convert::TryFrom, rc::Rc}; |
12 | 10 |
|
13 | 11 | // Shifting refers to adjusting the De Bruijn indices of free variables. A cutoff determines which |
14 | 12 | // variables are considered free. This function is used to raise or lower a term into a different |
@@ -429,23 +427,21 @@ pub fn open<'a>( |
429 | 427 |
|
430 | 428 | #[cfg(test)] |
431 | 429 | mod tests { |
432 | | - use { |
433 | | - crate::{ |
434 | | - assert_same, |
435 | | - de_bruijn::{open, signed_shift, unsigned_shift}, |
436 | | - term::{ |
437 | | - Term, |
438 | | - Variant::{ |
439 | | - Application, Boolean, Difference, EqualTo, False, GreaterThan, |
440 | | - GreaterThanOrEqualTo, If, Integer, IntegerLiteral, Lambda, LessThan, |
441 | | - LessThanOrEqualTo, Let, Negation, Pi, Product, Quotient, Sum, True, Type, |
442 | | - Unifier, Variable, |
443 | | - }, |
| 430 | + use crate::{ |
| 431 | + assert_same, |
| 432 | + de_bruijn::{open, signed_shift, unsigned_shift}, |
| 433 | + term::{ |
| 434 | + Term, |
| 435 | + Variant::{ |
| 436 | + Application, Boolean, Difference, EqualTo, False, GreaterThan, |
| 437 | + GreaterThanOrEqualTo, If, Integer, IntegerLiteral, Lambda, LessThan, |
| 438 | + LessThanOrEqualTo, Let, Negation, Pi, Product, Quotient, Sum, True, Type, Unifier, |
| 439 | + Variable, |
444 | 440 | }, |
445 | 441 | }, |
446 | | - num_bigint::ToBigInt, |
447 | | - std::{cell::RefCell, rc::Rc}, |
448 | 442 | }; |
| 443 | + use num_bigint::ToBigInt; |
| 444 | + use std::{cell::RefCell, rc::Rc}; |
449 | 445 |
|
450 | 446 | #[test] |
451 | 447 | fn signed_shift_unifier_none_valid() { |
|
0 commit comments