sorry to ask - but where is the point?

You quote some code and then want to be able to write this code to file again?

.fs files are plain text files - so you can just write the snippet you provided with the means we've got in System.IO (for example System.IO.File.CreateText).

I didn't look into quotations a lot but I guess they are similar to Expressions we've got with .net 3.0 and LINQ. You can use Expressions to build functionality on runtime but if you really wan't to do this you might want to look at

By on 5/12/2009 10:01 PM ()

sorry to ask - but where is the point?

One point is Brian's answer to this question: [link:stackoverflow.com] see my reply: a quotation is essentially an AST, producing a (pretty printed) source text from that does not seem to be trivial. (If however, anyone has gotten this to work, I'd be very interested as well).Btw, what is it that we might want to look at?

By on 5/12/2009 11:54 PM ()

I have put together something which does this, and works pretty well. However, with the current state of quotations, it's actually impossible to do this reliably, since F# specific meta-info about argument currying is lost. See this thread.

By on 5/13/2009 4:31 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper