F# 5 string interpolation
👋 Is ColoredPrintf expected to work with F# 5 string interpolation?
(tasks
|> Array.iter (fun t -> colorprintf $"$gray[{t.Title}]"))
throws this error
Unhandled exception. System.Exception: Expected function with 1 arguments
at BlackFox.MasterOfFoo.Core.PrintfBuilding.go@356-3(Int32 n, Type[] buf, Type ty, Int32 i)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.extractCurriedArguments(Type ty, Int32 n)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.PrintfBuilder`3.parseFromFormatSpecifier(PrintableElement prefix, String s, Type funcTy, Int32 i)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.PrintfBuilder`3.parseFormatString(String s, Type funcTy)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.PrintfBuilder`3.Build[T](String s)
at BlackFox.MasterOfFoo.Core.PrintfCache.Cache`4.generate(String fmt)
at [email protected](String delegateArg0)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at BlackFox.MasterOfFoo.MasterOfFooModule.doPrintfFromEnv[Printer,State,Residue,Result,a](PrintfFormat`4 format, a env)
Hi, not really this would need to essentially bump MasterOfFoo I think.
The principle of MasterOfFoo is that it's pretty much part of the code of the F# compiler extracted in a library. And for that to work the new code in the F# 5 compiler with string interpolation support need to be integrated into MasterOfFoo.
Thanks, understood. Do you plan to support it in the future?
I took a stab at it and it seem to work but need more testing especially around version compatibility as it isn't very documented how FSharp.Core / Compiler / Runtime interacts here.
Anyway you can follow the progress on https://github.com/vbfox/MasterOfFoo/pull/5
Thanks