<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Using the 'cabal sandbox add-source' solution now requires that I<br>
"add-source" the MarketModel package too. Otherwise, any change I make<br>
to this package will not be tracked.<br></blockquote><div><br>then…<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cabal sets the paths for "import"ed<br>
modules in the "hs-source-dirs:" and that is global to the whole<br>
package.<br></blockquote><div><br> I can't tell if you do or do not want ProfitCalculator and Persistence to track changes made in MarketModel.<br><br>If you do, and both should be in lock-step with it (unlike your situation with Tax), then you don't have a problem.<br><br>If not, then the problem is Trader would depend on ProfitCalculator which might depend on a different version of MarketModel than Persistence (upon which Trader also depends). That is a classic dependency problem and not a function of submodules or add-sourcing, per se. The Trader module seems to be at the top of this heap - why would you want the Trader to (indirectly) use one version of MarketModel through ProfitCalculator, and another through Persistence?<br><br></div></div></div></div>