mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
add multi element single tag structs
This commit is contained in:
parent
8b68dfd02f
commit
605e4e82b8
2 changed files with 137 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue