type __ghdl_bool_type is boolean {false, true}; type __ghdl_integer is signed (32); public function test_arg (v : __ghdl_bool_type) return __ghdl_integer declare begin if v then return __ghdl_integer'[1]; else return __ghdl_integer'[0]; end if; end;