Re: [julia-users] Re: Function in module templated on types defined later

2016-06-20 Thread Mauro
In that case, you need traits. In fact the motivating example I gave in my JuliaCon talk on this subject last year matches yours almost exactly: https://youtu.be/j9w8oHfG1Ic Anyway, probably you want to hand-code the Holy-traits. The example I give in my talk modified to fit your example:

[julia-users] Re: Function in module templated on types defined later

2016-06-20 Thread amiksvi
Thanks to both of you for the replies. Module M contains a lot of functions for the simulation of dynamical models. Outside M, users are required to define some specific types to be consistent with another historical project. The definition of these types should be kept as simple as possible,

[julia-users] Re: Function in module templated on types defined later

2016-06-20 Thread Fengyang Wang
This can't work because it would not, for instance, make sense to use module `M` independently. You could use the parent module from `M`, but as it stands that won't work either because loading the parent module will try to use `f` from `M`. What are you trying to do? On Monday, June 20, 2016