Why not change signature to

1
let compile_event (name, (evname,evparms,evactions), indx : int64, symbol_table : string list) = ..... 

and change the callsite (presumably the callsite already is capable of matching out the carried case-data, since it knows the case hand-on-heart)?

By on 1/20/2011 10:40 AM ()

Why not change signature to

1
let compile_event (name, (evname,evparms,evactions), indx : int64, symbol_table : string list) = ..... 

and change the callsite (presumably the callsite already is capable of matching out the carried case-data, since it knows the case hand-on-heart)?

That could work - obvious really - thanks! I'm writing (semi) realtime code and guess that passing in the Union type and matching on the actual type within the function will add an overhead that I can well do without!

Martin

By on 1/21/2011 7:47 AM ()

You are passing one of the value of discriminated union as a parameter. if you change the method signature like this you won't get compiler warning.

1
let compile_even (name, rule : RuleBody, indx : int64, symbol_table : string list) = ..... 

Regards,

Nyi Nyi

By on 1/20/2011 8:26 AM ()
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