Fixup type of fx-

fx- is not commutative.
Output is always a fixnum.
This commit is contained in:
Eric Dobson 2015-04-09 22:53:55 -07:00
parent b6a53b8916
commit 6bc24fdf83

View File

@ -132,20 +132,17 @@
(define fx--type
(lambda ()
(fx-from-cases
(binop -Zero)
(map (lambda (t) (commutative-binop t -Zero t))
(list -One -PosByte -Byte -PosIndex -Index))
(-> -Int -Zero -Fixnum : -true-filter : (-arg-path 0))
(-One -One . -> . -Zero)
(-PosByte -One . -> . -Byte)
(-PosIndex -One . -> . -Index)
(-PosFixnum -One . -> . -NonNegFixnum)
(-PosInt -One . -> . -NonNegFixnum)
(-NegInt -Nat . -> . -NegFixnum)
(-NonPosInt -PosInt . -> . -NegFixnum)
(-NonPosInt -Nat . -> . -NonPosFixnum)
(-PosInt -NonPosInt . -> . -PosInt)
(-Nat -NegInt . -> . -PosInt)
(-Nat -NonPosInt . -> . -Nat)
(-PosInt -NonPosInt . -> . -PosFixnum)
(-Nat -NegInt . -> . -PosFixnum)
(-Nat -NonPosInt . -> . -NonNegFixnum)
(-Int -Int . -> . -Fixnum))))
(define fx*-type
(lambda ()