Re: [isabelle] No tail-recursive code equation for

>> So, if there will be a tail-recursive code equation for in
>> the default library, please only activate it on languages which
>> really profit from tail-recursion.
> Is it possible to enable code equations only for certain target
> languages?

Here is at least one possible solution:

consts scala :: bool
code_const scala
  (Haskell "False")
  (Scala "true")
  (SML "false")
  (OCaml "false")
  (Eval "false")

(* tail recursive variant for Scala to reduce Stack-size at the cost of double traversion *)
  remove_comments :: "string => string"
  "remove_comments = (if scala then rev o (remove_comments_tail_rec []) else remove_comments_standard)"

Kind regards,

This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.