hakaru-dev / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
311 stars 30 forks source link

Maple "123*x" parses as Hakaru "x/1" #35

Closed ccshan closed 8 years ago

ccshan commented 8 years ago
$ cat p1.hk 
fn x prob: x*123
$ ~/.cabal/bin/simplify --debug p1.hk 
Sent to Maple:
use Hakaru, NewSLO in timelimit(90, RoundTrip(lam(x, HReal(Bound(`>=`,0)), (x * 123)), HFunction(HReal(Bound(`>=`,0)), HReal(Bound(`>=`,0))))) end use;
Returning from Maple:
lam(x,HReal(Bound(`>=`,0)),123*x)

fn x prob: (x / 1)

Change prob to real makes simplify produce the right output again.