Re: [isabelle-dev] Alternative thoughts about certifying and reading input parameters to Isabelle command functions

2013-05-21 Thread Makarius
On Sat, 27 Apr 2013, Florian Haftmann wrote: fun gen_foo prep_1 … prep_n raw_x_1 … raw_x_n ctxt = let val x_1 = prep_1 ctxt raw_x_1; … val x_n = prep_n ctxt raw_x_n; in ctxt | … end; val foo = gen_foo cert_1 … cert_n; val foo_cmd = gen_foo read_1 … read_n; Here,

Re: [isabelle-dev] Alternative thoughts about certifying and reading input parameters to Isabelle command functions

2013-04-28 Thread Thomas Sewell
Hey Florian. Just my two cents, but does uncurrying buy you anything here? The function doing the actual work, do_foo in your example, has not been given a name and type before. So you're free to have it accept a tuple: fun do_foo (x_1, x_2, ... x_n) = ... And now val foo_cmd =

[isabelle-dev] Alternative thoughts about certifying and reading input parameters to Isabelle command functions

2013-04-27 Thread Florian Haftmann
Hi all, when Isabelle packages (in the widest sense) provide an interface to the user, the following pattern is common practice: fun gen_foo prep_1 … prep_n raw_x_1 … raw_x_n ctxt = let val x_1 = prep_1 ctxt raw_x_1; … val x_n = prep_n ctxt raw_x_n; in ctxt | …