[racket] racklog bug?
plz note to case
(%which (X Y T) (%derive-type (list '+ X Y ) T )); => ((X . z) (Y . y)
(T . pls)) ;;why ? bug?
----------------------------------
#lang scheme
(require racklog)
(define %derive-type
(%let ( X Y T)
(%rel ( ) [( (list '+ X Y ) 'pls) ]
)))
(%which (T) (%derive-type '(+ z y ) T )) ;=> ((T . pls))
(%which (X Y T) (%derive-type (list '+ X Y ) T )); => ((X . z) (Y . y)
(T . pls)) ;;why ? bug?
(define %derive-type2
(%rel (X Y T ) [( (list '+ X Y ) 'pls) ]
))
(%which (T) (%derive-type2 '(+ z y ) T ));=> ((T . pls))
(%which (X Y T) (%derive-type2 (list '+ X Y ) T ));=>((X . _) (Y . _)
(T . pls)) ;; its OK