mirror of
https://github.com/Dummi26/mers.git
synced 2026-03-13 03:52:27 +01:00
[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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user