On Wed, Nov 04, 2015 at 08:09:36PM -0500, Stephen Michel wrote: > > My personal feeling is that it seems like refactoring the code, as > you're doing now, takes the most wholistic knowledge, whereas #1 and > #2 are slightly more localized. It seems like a smaller investment > required by someone like me to get involved with something more > localized, so I'd advise that you continue to do the work that has > the highest burden of knowledge.
Absolutely! That's the joy of doing this refactor: localizing required knowledge to accommodate the splitting of responsibilities. It's probably a bit too early for someone to actually *do* the refactor now, but everyone is certainly welcome to look at Mechanism.hs and start talking about what it could possibly look like. Here's my quick thoughts on that topic: Two new types, Mechanism.Project and Mechanism.User. Maaybe a third type, MonadMechanism or MechanismT or maybe just 'Mechanism a'. This might become necessary or useful, but I don't want to force it. This type would encapsulate all Mechanism actions in the way that 'DB a' encapsulates database actions. Right now, in fact, DB is taking the place of that third type (though it usually shows up as its type-synonym wonky alter ego, "MonadIO m => SqlPersistT m"). After those 2(3) core types, other types would show up as well. Something about payment history? Not certain. Everything else, of course, would be actions that create values of the given types. Type-driven development y'all!
signature.asc
Description: Digital signature
_______________________________________________ Dev mailing list [email protected] https://lists.snowdrift.coop/mailman/listinfo/dev
