@classmethod
    def make_instance(typeclass, cls, add, mul, abs, signum, fromInteger,
                      negate, sub=None):

        @sig(H[(Num, "a")]/ "a" >> "a" >> "a")
        def default_sub(a, b):
            return a.__add__(b.__neg__())

        sub = default_sub if sub is None else sub
        attrs = {"add":add, "mul":mul, "abs":abs, "signum":signum,
                 "fromInteger":fromInteger, "negate":negate, "sub":sub}

        build_instance(Num, cls, attrs)
        return
dataset/ETHPy150Open billpmurphy/hask/hask/Data/Num.py/Num.make_instance/original