mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
add boolean to Type and FlatType
This commit is contained in:
parent
3268c267bd
commit
2b7a20bd23
3 changed files with 46 additions and 36 deletions
|
@ -7,6 +7,7 @@ use crate::types::Constraint::{self, *};
|
|||
use crate::types::Problem;
|
||||
use crate::types::Type::{self, *};
|
||||
use crate::unify::{unify, Unified};
|
||||
use crate::uniqueness::boolean_algebra::Bool;
|
||||
|
||||
type Env = ImMap<Symbol, Variable>;
|
||||
|
||||
|
@ -401,6 +402,12 @@ fn type_to_variable(
|
|||
|
||||
register(subs, rank, pools, content)
|
||||
}
|
||||
Boolean(Bool::Variable(var)) => *var,
|
||||
Boolean(b) => {
|
||||
let content = Content::Structure(FlatType::Boolean(b.clone()));
|
||||
|
||||
register(subs, rank, pools, content)
|
||||
}
|
||||
Function(args, ret_type) => {
|
||||
let mut arg_vars = Vec::with_capacity(args.len());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue