Skip to content

Commit 142e63c

Browse files
committed
move builtins from crate root to private module in compile
This module was introduced in #145 as a public module. But actually it is only ever used by the compiler, and it doesn't really make sense outside the compile because of its use of `ProgNode`. We may want to later make the builtins module be an extension trait of Constructible or something, but as long as it depends on ProgNode it should not be public (and it cannot be public, after the next commit).
1 parent cbf7ce6 commit 142e63c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed
File renamed without changes.

src/compile/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
//! Compile the parsed ast into a simplicity program
22
3+
mod builtins;
4+
35
use std::sync::Arc;
46

57
use either::Either;
68
use simplicity::jet::Elements;
79
use simplicity::node::{CoreConstructible as _, JetConstructible as _};
810
use simplicity::{Cmr, FailEntropy};
911

12+
use self::builtins::array_fold;
1013
use crate::array::{BTreeSlice, Partition};
1114
use crate::ast::{
1215
Call, CallName, Expression, ExpressionInner, Match, Program, SingleExpression,
1316
SingleExpressionInner, Statement,
1417
};
15-
use crate::builtins::array_fold;
1618
use crate::debug::CallTracker;
1719
use crate::error::{Error, RichError, Span, WithSpan};
1820
use crate::named::{self, CoreExt, PairBuilder};

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pub type ProgNode = Arc<named::ConstructNode<Elements>>;
44

55
pub mod array;
66
pub mod ast;
7-
pub mod builtins;
87
pub mod compile;
98
pub mod debug;
109
pub mod dummy_env;

0 commit comments

Comments
 (0)