knave 0.12.5

A Lisp programming language for humans and agents that infers types and ownership and compiles to readable Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::rust_types::RustTypeTable;
use super::ty::Type;

#[derive(Clone, Copy)]
pub struct Pipelines<'a> {
    rust_types: &'a RustTypeTable,
}

impl<'a> Pipelines<'a> {
    pub fn new(rust_types: &'a RustTypeTable) -> Self {
        Self { rust_types }
    }

    pub fn is_pipeline(&self, ty: &Type) -> bool {
        matches!(ty, Type::Named(binding, _) if self.rust_types.is_iterator(*binding))
    }
}