def METHOD_NAME(self, mini=None, maxi=None):
    self.start_msg('Checking for haxe version')
    try:
        curr = re.search(
            r'(\d+.?)+',
            self.cmd_and_log(self.env.HAXE + ['-version'])).group()
    except Errors.WafError:
        self.end_msg(False)
        self.fatal('Can\'t get haxe version')
        return
    if mini and Utils.num2ver(curr) < Utils.num2ver(mini):
        self.end_msg('wrong', color='RED')
        self.fatal('%s is too old, need >= %s' % (curr, mini))
        return
    if maxi and Utils.num2ver(curr) > Utils.num2ver(maxi):
        self.end_msg('wrong', color='RED')
        self.fatal('%s is too new, need <= %s' % (curr, maxi))
        return
    self.end_msg(curr, color='GREEN')
    self.env.HAXE_VERSION = curr