mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
initial implementation
This commit is contained in:
parent
b3b3b8790c
commit
92f2927046
13 changed files with 313 additions and 2 deletions
|
@ -33,6 +33,11 @@ pub fn basic_type_from_layout<'a, 'ctx, 'env>(
|
|||
..
|
||||
} => basic_type_from_record(env, sorted_fields),
|
||||
LambdaSet(lambda_set) => basic_type_from_layout(env, &lambda_set.runtime_representation()),
|
||||
Boxed(inner_layout) => {
|
||||
let inner_type = basic_type_from_layout_1(env, inner_layout);
|
||||
|
||||
inner_type.ptr_type(AddressSpace::Generic).into()
|
||||
}
|
||||
Union(union_layout) => {
|
||||
use UnionLayout::*;
|
||||
|
||||
|
@ -96,6 +101,11 @@ pub fn basic_type_from_layout_1<'a, 'ctx, 'env>(
|
|||
LambdaSet(lambda_set) => {
|
||||
basic_type_from_layout_1(env, &lambda_set.runtime_representation())
|
||||
}
|
||||
Boxed(inner_layout) => {
|
||||
let inner_type = basic_type_from_layout_1(env, inner_layout);
|
||||
|
||||
inner_type.ptr_type(AddressSpace::Generic).into()
|
||||
}
|
||||
Union(union_layout) => {
|
||||
use UnionLayout::*;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue