mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-17 14:47:21 +03:00
Merge pull request #208 from HigherOrderCO/bug/sc-471/oall-and-ono-all-reset-the-adt-encoding
[sc-471] Oall and Ono-all reset the adt encoding
This commit is contained in:
commit
20b01400aa
10
src/lib.rs
10
src/lib.rs
@ -377,6 +377,16 @@ impl CompileOpts {
|
||||
}
|
||||
}
|
||||
|
||||
/// Set all opts as true and keep the current adt encoding.
|
||||
pub fn set_all(self) -> Self {
|
||||
Self { adt_encoding: self.adt_encoding, ..Self::heavy() }
|
||||
}
|
||||
|
||||
/// Set all opts as false and keep the current adt encoding.
|
||||
pub fn set_no_all(self) -> Self {
|
||||
Self { adt_encoding: self.adt_encoding, ..Self::default() }
|
||||
}
|
||||
|
||||
/// All optimizations disabled, except detach supercombinators.
|
||||
pub fn light() -> Self {
|
||||
Self { supercombinators: true, ..Self::default() }
|
||||
|
@ -306,8 +306,8 @@ impl OptArgs {
|
||||
let mut opts = CompileOpts::light();
|
||||
for arg in args {
|
||||
match arg {
|
||||
All => opts = CompileOpts::heavy(),
|
||||
NoAll => opts = CompileOpts::default(),
|
||||
All => opts = opts.set_all(),
|
||||
NoAll => opts = opts.set_no_all(),
|
||||
Eta => opts.eta = true,
|
||||
NoEta => opts.eta = false,
|
||||
Prune => opts.prune = true,
|
||||
|
Loading…
Reference in New Issue
Block a user