Tighten type of fx*

Make multiplication by Zero return Zero and by One return the other arg.
This commit is contained in:
Eric Dobson 2015-04-09 22:58:58 -07:00
parent 6bc24fdf83
commit c923663e55

View File

@ -147,8 +147,9 @@
(define fx*-type
(lambda ()
(fx-from-cases
(map binop (list -Zero -One))
(commutative-binop -Zero -Int)
(-> -One -Int -Fixnum : -true-filter : (-arg-path 1))
(-> -Int -One -Fixnum : -true-filter : (-arg-path 0))
(commutative-binop -Int -Zero)
(-PosByte -PosByte . -> . -PosIndex)
(-Byte -Byte . -> . -Index)
(-PosInt -PosInt . -> . -PosFixnum)