*To*: Peter Lammich <lammich at in.tum.de>*Subject*: Re: [isabelle] No tail-recursive code equation for List.map*From*: René Thiemann <rene.thiemann at uibk.ac.at>*Date*: Fri, 26 Apr 2013 21:36:32 +0200*Cc*: cl-isabelle-users at lists.cam.ac.uk*In-reply-to*: <1366992954.2569.40.camel@lapbroy33>*References*: <CAGbqCMz-55E56FmnaRtdCGfaiuUUmn_8uMLS0-YDjgNh6cQQ6g@mail.gmail.com> <F42C9D80-06F3-499B-8F0E-5005A2362BC8@uibk.ac.at> <1366992954.2569.40.camel@lapbroy33>

>> So, if there will be a tail-recursive code equation for List.map 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 *) definition remove_comments :: "string => string" where "remove_comments = (if scala then rev o (remove_comments_tail_rec []) else remove_comments_standard)" Kind regards, René

**Follow-Ups**:**Re: [isabelle] No tail-recursive code equation for List.map***From:*Florian Haftmann

**References**:**[isabelle] No tail-recursive code equation for List.map***From:*C. Diekmann

**Re: [isabelle] No tail-recursive code equation for List.map***From:*René Thiemann

**Re: [isabelle] No tail-recursive code equation for List.map***From:*Peter Lammich

- Previous by Date: Re: [isabelle] No tail-recursive code equation for List.map
- Next by Date: Re: [isabelle] BibTeX files on AFP
- Previous by Thread: Re: [isabelle] No tail-recursive code equation for List.map
- Next by Thread: Re: [isabelle] No tail-recursive code equation for List.map
- Cl-isabelle-users April 2013 archives indexes sorted by: [ thread ] [ subject ] [ author ] [ date ]
- Cl-isabelle-users list archive Table of Contents
- More information about the Cl-isabelle-users mailing list