+{"name":"examples/fac.rinha","expression":{"kind":"Let","name":{"text":"factorial","location":{"start":4,"end":13,"filename":"examples/fac.rinha"}},"value":{"kind":"Function","parameters":[{"text":"n","location":{"start":20,"end":21,"filename":"examples/fac.rinha"}}],"value":{"kind":"If","condition":{"kind":"Binary","lhs":{"kind":"Var","text":"n","location":{"start":36,"end":37,"filename":"examples/fac.rinha"}},"op":"Eq","rhs":{"kind":"Int","value":0,"location":{"start":41,"end":42,"filename":"examples/fac.rinha"}},"location":{"start":36,"end":42,"filename":"examples/fac.rinha"}},"then":{"kind":"Int","value":1,"location":{"start":54,"end":55,"filename":"examples/fac.rinha"}},"otherwise":{"kind":"Binary","lhs":{"kind":"Var","text":"n","location":{"start":77,"end":78,"filename":"examples/fac.rinha"}},"op":"Mul","rhs":{"kind":"Call","callee":{"kind":"Var","text":"factorial","location":{"start":81,"end":90,"filename":"examples/fac.rinha"}},"arguments":[{"kind":"Binary","lhs":{"kind":"Var","text":"n","location":{"start":91,"end":92,"filename":"examples/fac.rinha"}},"op":"Sub","rhs":{"kind":"Int","value":1,"location":{"start":95,"end":96,"filename":"examples/fac.rinha"}},"location":{"start":91,"end":96,"filename":"examples/fac.rinha"}}],"location":{"start":81,"end":97,"filename":"examples/fac.rinha"}},"location":{"start":77,"end":97,"filename":"examples/fac.rinha"}},"location":{"start":32,"end":103,"filename":"examples/fac.rinha"}},"location":{"start":16,"end":105,"filename":"examples/fac.rinha"}},"next":{"kind":"Let","name":{"text":"createTuple","location":{"start":112,"end":123,"filename":"examples/fac.rinha"}},"value":{"kind":"Function","parameters":[{"text":"s","location":{"start":130,"end":131,"filename":"examples/fac.rinha"}},{"text":"n","location":{"start":133,"end":134,"filename":"examples/fac.rinha"}}],"value":{"kind":"Let","name":{"text":"repeatedString","location":{"start":149,"end":163,"filename":"examples/fac.rinha"}},"value":{"kind":"Function","parameters":[{"text":"str","location":{"start":170,"end":173,"filename":"examples/fac.rinha"}},{"text":"times","location":{"start":175,"end":180,"filename":"examples/fac.rinha"}}],"value":{"kind":"If","condition":{"kind":"Binary","lhs":{"kind":"Var","text":"times","location":{"start":199,"end":204,"filename":"examples/fac.rinha"}},"op":"Eq","rhs":{"kind":"Int","value":1,"location":{"start":208,"end":209,"filename":"examples/fac.rinha"}},"location":{"start":199,"end":209,"filename":"examples/fac.rinha"}},"then":{"kind":"Var","text":"str","location":{"start":225,"end":228,"filename":"examples/fac.rinha"}},"otherwise":{"kind":"Binary","lhs":{"kind":"Var","text":"str","location":{"start":258,"end":261,"filename":"examples/fac.rinha"}},"op":"Add","rhs":{"kind":"Call","callee":{"kind":"Var","text":"repeatedString","location":{"start":264,"end":278,"filename":"examples/fac.rinha"}},"arguments":[{"kind":"Var","text":"str","location":{"start":279,"end":282,"filename":"examples/fac.rinha"}},{"kind":"Binary","lhs":{"kind":"Var","text":"times","location":{"start":284,"end":289,"filename":"examples/fac.rinha"}},"op":"Sub","rhs":{"kind":"Int","value":1,"location":{"start":292,"end":293,"filename":"examples/fac.rinha"}},"location":{"start":284,"end":293,"filename":"examples/fac.rinha"}}],"location":{"start":264,"end":294,"filename":"examples/fac.rinha"}},"location":{"start":258,"end":294,"filename":"examples/fac.rinha"}},"location":{"start":195,"end":304,"filename":"examples/fac.rinha"}},"location":{"start":166,"end":310,"filename":"examples/fac.rinha"}},"next":{"kind":"Tuple","first":{"kind":"Var","text":"s","location":{"start":322,"end":323,"filename":"examples/fac.rinha"}},"second":{"kind":"Call","callee":{"kind":"Var","text":"repeatedString","location":{"start":325,"end":339,"filename":"examples/fac.rinha"}},"arguments":[{"kind":"Var","text":"s","location":{"start":340,"end":341,"filename":"examples/fac.rinha"}},{"kind":"Var","text":"n","location":{"start":343,"end":344,"filename":"examples/fac.rinha"}}],"location":{"start":325,"end":345,"filename":"examples/fac.rinha"}},"location":{"start":321,"end":346,"filename":"examples/fac.rinha"}},"location":{"start":145,"end":346,"filename":"examples/fac.rinha"}},"location":{"start":126,"end":348,"filename":"examples/fac.rinha"}},"next":{"kind":"Let","name":{"text":"factResult","location":{"start":355,"end":365,"filename":"examples/fac.rinha"}},"value":{"kind":"Call","callee":{"kind":"Var","text":"factorial","location":{"start":368,"end":377,"filename":"examples/fac.rinha"}},"arguments":[{"kind":"Int","value":7,"location":{"start":378,"end":379,"filename":"examples/fac.rinha"}}],"location":{"start":368,"end":380,"filename":"examples/fac.rinha"}},"next":{"kind":"Let","name":{"text":"_","location":{"start":386,"end":387,"filename":"examples/fac.rinha"}},"value":{"kind":"Print","value":{"kind":"Str","value":"calculated fact","location":{"start":396,"end":413,"filename":"examples/fac.rinha"}},"location":{"start":390,"end":414,"filename":"examples/fac.rinha"}},"next":{"kind":"Let","name":{"text":"_","location":{"start":420,"end":421,"filename":"examples/fac.rinha"}},"value":{"kind":"Print","value":{"kind":"Var","text":"factResult","location":{"start":430,"end":440,"filename":"examples/fac.rinha"}},"location":{"start":424,"end":441,"filename":"examples/fac.rinha"}},"next":{"kind":"Let","name":{"text":"myTuple","location":{"start":447,"end":454,"filename":"examples/fac.rinha"}},"value":{"kind":"Call","callee":{"kind":"Var","text":"createTuple","location":{"start":457,"end":468,"filename":"examples/fac.rinha"}},"arguments":[{"kind":"Str","value":"yummm memory! ","location":{"start":469,"end":485,"filename":"examples/fac.rinha"}},{"kind":"Var","text":"factResult","location":{"start":487,"end":497,"filename":"examples/fac.rinha"}}],"location":{"start":457,"end":498,"filename":"examples/fac.rinha"}},"next":{"kind":"Let","name":{"text":"_","location":{"start":505,"end":506,"filename":"examples/fac.rinha"}},"value":{"kind":"Print","value":{"kind":"First","value":{"kind":"Var","text":"myTuple","location":{"start":521,"end":528,"filename":"examples/fac.rinha"}},"location":{"start":515,"end":529,"filename":"examples/fac.rinha"}},"location":{"start":509,"end":530,"filename":"examples/fac.rinha"}},"next":{"kind":"Print","value":{"kind":"Second","value":{"kind":"Var","text":"myTuple","location":{"start":545,"end":552,"filename":"examples/fac.rinha"}},"location":{"start":538,"end":553,"filename":"examples/fac.rinha"}},"location":{"start":532,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":501,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":443,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":416,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":382,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":351,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":108,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":0,"end":554,"filename":"examples/fac.rinha"}},"location":{"start":0,"end":554,"filename":"examples/fac.rinha"}}
0 commit comments