add signatures for boolean functions

This commit is contained in:
Folkert 2020-02-28 23:18:26 +01:00
parent ef460de384
commit a55e29e6a0

View File

@ -336,6 +336,18 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
SolvedType::Func(vec![bool_type(), bool_type()], Box::new(bool_type())),
);
// xor : Bool, Bool -> Bool
add_type(
Symbol::BOOL_XOR,
SolvedType::Func(vec![bool_type(), bool_type()], Box::new(bool_type())),
);
// not : Bool -> Bool
add_type(
Symbol::BOOL_NOT,
SolvedType::Func(vec![bool_type()], Box::new(bool_type())),
);
// Str module
// isEmpty : Str -> Bool