[no version bump yet] better and safer stdlib impl

only transformed configs/with_string so far,
but other configs/* should follow soon.
also, this will help with implementing
new stdlib functions in the future.
This commit is contained in:
Mark
2024-07-02 22:04:42 +02:00
parent 18cd3ee0ae
commit 50928cca1d
21 changed files with 841 additions and 184 deletions

View File

@@ -246,10 +246,13 @@ pub fn type_from_parsed(
})
.collect::<Result<_, _>>()?,
))),
ParsedType::Function(v) => as_type.add(Arc::new(data::function::FunctionT(Err(v
.iter()
.map(|(i, o)| Ok((type_from_parsed(i, info)?, type_from_parsed(o, info)?)))
.collect::<Result<_, CheckError>>()?)))),
ParsedType::Function(v) => {
as_type.add(Arc::new(data::function::FunctionT(Err(Arc::new(
v.iter()
.map(|(i, o)| Ok((type_from_parsed(i, info)?, type_from_parsed(o, info)?)))
.collect::<Result<_, CheckError>>()?,
)))))
}
ParsedType::Type(name) => match info
.scopes
.iter()