diff --git a/include/xo/type/Metatype.hpp b/include/xo/type/Metatype.hpp index 8f7fc62..9ff612a 100644 --- a/include/xo/type/Metatype.hpp +++ b/include/xo/type/Metatype.hpp @@ -48,6 +48,9 @@ namespace xo { /** any numeric type: i16|i32|i64|f32|f64 **/ t_numeric, + /** generalized boolean type: bool, function with bool codomain **/ + t_booleic, + /** any callable type (e.g. all function types) **/ t_callable, @@ -78,6 +81,7 @@ namespace xo { static Metatype t_dict() { return Metatype(code::t_dict); } static Metatype t_integer() { return Metatype(code::t_integer); } static Metatype t_numeric() { return Metatype(code::t_numeric); } + static Metatype t_booleic() { return Metatype(code::t_booleic); } static Metatype t_callable() { return Metatype(code::t_callable); } static Metatype t_any() { return Metatype(code::t_any); } diff --git a/src/type/Metatype.cpp b/src/type/Metatype.cpp index aa1a1bb..1ac26f6 100644 --- a/src/type/Metatype.cpp +++ b/src/type/Metatype.cpp @@ -31,6 +31,7 @@ namespace xo { case code::t_dict: return "dict"; case code::t_integer: return "integer"; + case code::t_booleic: return "booleic"; case code::t_numeric: return "numeric"; case code::t_callable: return "callable"; case code::t_any: return "any"; @@ -76,6 +77,8 @@ namespace xo { case code::t_integer: return true; + case code::t_booleic: + return true; case code::t_numeric: return true; case code::t_callable: