add multi element single tag structs

This commit is contained in:
Brendan Hansknecht 2022-12-15 12:06:13 -08:00
parent 8b68dfd02f
commit 605e4e82b8
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
2 changed files with 137 additions and 11 deletions

View file

@ -50,6 +50,10 @@ pub fn generate(input_path: &Path, output_path: &Path, spec_path: &Path) -> io::
types.iter().map(|x| x.into()).collect();
let mut files = roc_std::RocResult::err(roc_std::RocStr::empty());
unsafe { make_glue(&mut files, &roc_types) };
// Roc will free data passed into it. So forget that data.
std::mem::forget(roc_types);
let files: Result<roc_std::RocList<roc_type::File>, roc_std::RocStr> = files.into();
let files = files.unwrap_or_else(|err| {
eprintln!("Glue generation failed: {}", err);