Skip to content

Commit

Permalink
poly_func::test: hide new_array, (re-)export nested_func (through typ…
Browse files Browse the repository at this point in the history
…es::test)
  • Loading branch information
acl-cqc committed Nov 7, 2023
1 parent b989014 commit e0d3c9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ where

#[cfg(test)]
pub(crate) mod test {
pub(crate) use poly_func::test::nested_func;

use super::*;
use crate::{
Expand Down
4 changes: 2 additions & 2 deletions src/types/poly_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ pub(crate) mod test {
}

// The standard library new_array does not allow passing in a variable for size.
pub(crate) fn new_array(ty: Type, s: TypeArg) -> Type {
fn new_array(ty: Type, s: TypeArg) -> Type {
let array_def = PRELUDE.get_type("array").unwrap();
Type::new_extension(
array_def
Expand Down Expand Up @@ -511,7 +511,7 @@ pub(crate) mod test {
}

// forall A. A -> (forall C. C -> List(Tuple(C, A))
fn nested_func() -> PolyFuncType {
pub(crate) fn nested_func() -> PolyFuncType {
PolyFuncType::new_validated(
vec![TypeParam::Type(TypeBound::Any)],
FunctionType::new(
Expand Down

0 comments on commit e0d3c9d

Please sign in to comment.